File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -111,13 +111,15 @@ export class MsalProvider extends IProvider {
111111 public scopes : string [ ] ;
112112
113113 /**
114- * Determines application
114+ * Gets the user agent application instance
115115 *
116116 * @protected
117117 * @type {UserAgentApplication }
118118 * @memberof MsalProvider
119119 */
120- protected _userAgentApplication : UserAgentApplication ;
120+ public get userAgentApplication ( ) {
121+ return this . _userAgentApplication ;
122+ }
121123
122124 /**
123125 * client-id authentication
@@ -127,6 +129,8 @@ export class MsalProvider extends IProvider {
127129 * @memberof MsalProvider
128130 */
129131 protected clientId : string ;
132+
133+ private _userAgentApplication : UserAgentApplication ;
130134 private _loginType : LoginType ;
131135 private _loginHint : string ;
132136
Original file line number Diff line number Diff line change @@ -187,7 +187,7 @@ export class TeamsProvider extends MsalProvider {
187187 scopes
188188 } ) ;
189189
190- if ( ( UserAgentApplication . prototype as any ) . urlContainsHash ( window . location . hash ) ) {
190+ if ( provider . userAgentApplication . urlContainsHash ( window . location . hash ) ) {
191191 // the page should redirect again
192192 return ;
193193 }
@@ -347,7 +347,7 @@ export class TeamsProvider extends MsalProvider {
347347 }
348348
349349 try {
350- const response = await this . _userAgentApplication . acquireTokenSilent ( accessTokenRequest ) ;
350+ const response = await this . userAgentApplication . acquireTokenSilent ( accessTokenRequest ) ;
351351 return response . accessToken ;
352352 } catch ( e ) {
353353 if ( this . requiresInteraction ( e ) ) {
You can’t perform that action at this time.
0 commit comments