File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ export class BrowserClient extends BaseClient {
190190 * });
191191 * ```
192192 */
193- public connectAccount ( opts : StartConnectOpts ) {
193+ public async connectAccount ( opts : StartConnectOpts ) {
194194 const onMessage = ( e : MessageEvent ) => {
195195 switch ( e . data ?. type ) {
196196 case "success" :
@@ -212,11 +212,11 @@ export class BrowserClient extends BaseClient {
212212 window . addEventListener ( "message" , onMessage ) ;
213213
214214 try {
215- this . createIframe ( opts ) ;
215+ await this . createIframe ( opts ) ;
216216 } catch ( err ) {
217217 opts . onError ?.( err as ConnectError ) ;
218218 }
219- this . refreshToken ( ) ; // token is used only once
219+ this . refreshToken ( ) ; // token expires once it's used to create a connected account. We need to get a new token for the next requests.
220220 }
221221
222222 /**
You can’t perform that action at this time.
0 commit comments