Skip to content

Commit a4c6d54

Browse files
committed
send redirect url in params
1 parent 7c52a10 commit a4c6d54

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

demo/rn-bare-example/package-lock.json

Lines changed: 2 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Web3Auth.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,11 @@ class Web3Auth implements IWeb3Auth {
137137

138138
const dataObject: OpenloginSessionConfig = {
139139
actionType: OPENLOGIN_ACTIONS.LOGIN,
140-
options: {
141-
...this.initParams,
140+
options: this.initParams,
141+
params: {
142+
...loginParams,
142143
redirectUrl: loginParams.redirectUrl || this.initParams.redirectUrl,
143144
},
144-
params: loginParams,
145145
};
146146

147147
const result = await this.openloginHandler(`${this.baseUrl}/start`, dataObject);
@@ -237,7 +237,7 @@ class Web3Auth implements IWeb3Auth {
237237
}
238238

239239
private async openloginHandler(url: string, dataObject: OpenloginSessionConfig) {
240-
log.debug(`[Web3Auth] params passed to Web3Auth: ${dataObject}`);
240+
log.debug(`[Web3Auth] config passed: ${JSON.stringify(dataObject)}`);
241241
const loginId = await this.getLoginId(dataObject);
242242

243243
const configParams: BaseLoginParams = {
@@ -250,7 +250,7 @@ class Web3Auth implements IWeb3Auth {
250250
hash: { b64Params: jsonToBase64(configParams) },
251251
});
252252

253-
return this.webBrowser.openAuthSessionAsync(loginUrl, dataObject.options.redirectUrl);
253+
return this.webBrowser.openAuthSessionAsync(loginUrl, dataObject.params.redirectUrl);
254254
}
255255

256256
private async _authorizeSession(): Promise<OpenloginSessionData> {

0 commit comments

Comments
 (0)