This repository was archived by the owner on May 16, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,16 @@ export class AuthenticationComponent extends GraphExplorerComponent {
3636
3737 public async ngOnInit ( ) {
3838 // Register Callbacks for redirect flow
39- app . handleRedirectCallback ( this . acquireTokenCallBack , this . acquireTokenErrorCallBack ) ;
39+ app . handleRedirectCallback ( ( error , response ) => {
40+ if ( error ) {
41+ this . acquireTokenErrorCallBack ( error ) ;
42+ } else {
43+ AppComponent . explorerValues . authentication . status = 'authenticated' ;
44+ this . displayUserProfile ( ) ;
45+ this . setPermissions ( response ) ;
46+ }
47+ } ) ;
48+
4049 AppComponent . explorerValues . authentication . status = 'anonymous' ;
4150
4251 const prevVersion = localStorage . getItem ( 'version' ) ;
@@ -162,7 +171,7 @@ export class AuthenticationComponent extends GraphExplorerComponent {
162171 * We only want to change the authentication status to anonymous for errors other than those
163172 * that require interation from the user.
164173 */
165- if ( ! requiresInteraction ( error . errorCode ) || error . errorCode !== 'acquiretoken_progress_error' ) {
174+ if ( ! requiresInteraction ( error . errorCode ) && error . errorCode !== 'acquiretoken_progress_error' ) {
166175 AppComponent . explorerValues . authentication . status = 'anonymous' ;
167176 }
168177 }
You can’t perform that action at this time.
0 commit comments