[FIX] Saml (#1996)
* [FIX] SAML incorrect close * [FIX] Pathname Co-authored-by: Diego Mello <diegolmello@gmail.com>
This commit is contained in:
parent
0298c38b3d
commit
32d105051d
|
@ -79,11 +79,11 @@ class AuthenticationWebView extends React.PureComponent {
|
||||||
if (this.authType === 'saml' || this.authType === 'cas') {
|
if (this.authType === 'saml' || this.authType === 'cas') {
|
||||||
const { navigation } = this.props;
|
const { navigation } = this.props;
|
||||||
const ssoToken = navigation.getParam('ssoToken');
|
const ssoToken = navigation.getParam('ssoToken');
|
||||||
if (url.includes('ticket') || url.includes('validate') || url.includes('saml_idp_credentialToken')) {
|
const parsedUrl = parse(url, true);
|
||||||
|
if (parsedUrl.pathname?.includes('ticket') || parsedUrl.pathname?.includes('validate') || parsedUrl.query?.saml_idp_credentialToken) {
|
||||||
let payload;
|
let payload;
|
||||||
if (this.authType === 'saml') {
|
if (this.authType === 'saml') {
|
||||||
const parsedUrl = parse(url, true);
|
const token = parsedUrl.query?.saml_idp_credentialToken || ssoToken;
|
||||||
const token = (parsedUrl.query && parsedUrl.query.saml_idp_credentialToken) || ssoToken;
|
|
||||||
const credentialToken = { credentialToken: token };
|
const credentialToken = { credentialToken: token };
|
||||||
payload = { ...credentialToken, saml: true };
|
payload = { ...credentialToken, saml: true };
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue