File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
packages/data-sdk/src/stores Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -161,7 +161,11 @@ export class AuthenticationStore implements IAuthenticationStore {
161
161
}
162
162
}
163
163
164
- async loginWithToken ( token : string , refreshToken ?: string ) {
164
+ async loginWithToken (
165
+ token : string ,
166
+ refreshToken ?: string ,
167
+ skipUserFetch = false
168
+ ) {
165
169
const tokenData = JSON . parse ( decode ( token . split ( "." ) [ 1 ] ) ) ;
166
170
try {
167
171
let userId : string | undefined ;
@@ -183,7 +187,7 @@ export class AuthenticationStore implements IAuthenticationStore {
183
187
userId = tokenData [ "formant:claims" ] . userId ;
184
188
}
185
189
186
- if ( userId && this . _currentUser ?. id !== userId ) {
190
+ if ( userId && this . _currentUser ?. id !== userId && ! skipUserFetch ) {
187
191
const result = await fetch ( `${ this . _apiUrl } /v1/admin/users/${ userId } ` , {
188
192
method : "GET" ,
189
193
headers : {
You can’t perform that action at this time.
0 commit comments