@@ -116,8 +116,8 @@ export class Authorizer {
116116 if ( err . error ) {
117117 window . location . replace (
118118 `${ this . config . authorizerURL } /app?state=${ encode (
119- JSON . stringify ( this . config ) ,
120- ) } &redirect_uri=${ this . config . redirectURL } `,
119+ JSON . stringify ( { clientID : this . config . clientID , redirectURL : this . config . redirectURL , authorizerURL : this . config . authorizerURL } ) ,
120+ ) } &redirect_uri=${ encodeURIComponent ( this . config . redirectURL || '' ) } `,
121121 ) ;
122122 }
123123
@@ -142,8 +142,8 @@ export class Authorizer {
142142
143143 window . location . replace (
144144 `${ this . config . authorizerURL } /app?state=${ encode (
145- JSON . stringify ( this . config ) ,
146- ) } &redirect_uri=${ this . config . redirectURL } `,
145+ JSON . stringify ( { clientID : this . config . clientID , redirectURL : this . config . redirectURL , authorizerURL : this . config . authorizerURL } ) ,
146+ ) } &redirect_uri=${ encodeURIComponent ( this . config . redirectURL || '' ) } `,
147147 ) ;
148148 return this . errorResponse ( err ) ;
149149 }
@@ -350,9 +350,9 @@ export class Authorizer {
350350 if ( roles && roles . length ) urlState += `&roles=${ roles . join ( ',' ) } ` ;
351351
352352 window . location . replace (
353- `${ this . config . authorizerURL } /oauth_login/${ oauthProvider } ?redirect_uri=${
354- redirect_uri || this . config . redirectURL
355- } &state=${ urlState } `,
353+ `${ this . config . authorizerURL } /oauth_login/${ oauthProvider } ?redirect_uri=${ encodeURIComponent (
354+ redirect_uri || this . config . redirectURL || ''
355+ ) } &state=${ encodeURIComponent ( urlState ) } `,
356356 ) ;
357357 } ;
358358
0 commit comments