Skip to content

Commit

Permalink
🔄 synced local 'src/' with remote 'src/'
Browse files Browse the repository at this point in the history
  • Loading branch information
circle-github-action-bot committed Jun 12, 2024
1 parent 1a3326c commit 2130669
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
22 changes: 11 additions & 11 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,8 @@ export class W3SSdk {
configs?: Configs,
onLoginComplete?: LoginCompleteCallback
) {
if (configs?.socialLoginConfigs?.apple && getApps().length === 0) {
this.firebaseApp = initializeApp(configs.socialLoginConfigs.apple)
if (configs?.loginConfigs?.apple && getApps().length === 0) {
this.firebaseApp = initializeApp(configs.loginConfigs.apple)
} else if (getApps().length !== 0) {
this.firebaseApp = getApps()[0]
}
Expand Down Expand Up @@ -392,7 +392,7 @@ export class W3SSdk {
}

private performFacebookLogin() {
if (!this?.configs?.socialLoginConfigs?.facebook) {
if (!this?.configs?.loginConfigs?.facebook) {
void this.onLoginComplete?.(
{
code: 155140,
Expand All @@ -404,7 +404,7 @@ export class W3SSdk {
return
}

const { appId, redirectUri } = this.configs.socialLoginConfigs.facebook
const { appId, redirectUri } = this.configs.loginConfigs.facebook

const { url = '', state = '' } =
this.generateOauthUrlWithParams(
Expand All @@ -418,7 +418,7 @@ export class W3SSdk {
}

private performGoogleLogin() {
if (!this.configs?.socialLoginConfigs?.google) {
if (!this.configs?.loginConfigs?.google) {
void this.onLoginComplete?.(
{
code: 155140,
Expand All @@ -430,7 +430,7 @@ export class W3SSdk {
return
}

const { clientId, redirectUri } = this.configs.socialLoginConfigs.google
const { clientId, redirectUri } = this.configs.loginConfigs.google

const {
url = '',
Expand Down Expand Up @@ -732,16 +732,16 @@ export class W3SSdk {
deviceInfo: this.deviceInfo,
ssoVerification: {
token: this.socialLoginToken,
deviceToken: this.configs?.socialLoginConfigs?.deviceToken,
deviceToken: this.configs?.loginConfigs?.deviceToken,
deviceEncryptionKey:
this.configs?.socialLoginConfigs?.deviceEncryptionKey,
this.configs?.loginConfigs?.deviceEncryptionKey,
socialLoginProvider: this.socialLoginProvider,
},
emailVerification: {
deviceToken: this.configs?.socialLoginConfigs?.deviceToken,
deviceToken: this.configs?.loginConfigs?.deviceToken,
deviceEncryptionKey:
this.configs?.socialLoginConfigs?.deviceEncryptionKey,
otpToken: this.configs?.socialLoginConfigs?.otpToken,
this.configs?.loginConfigs?.deviceEncryptionKey,
otpToken: this.configs?.loginConfigs?.otpToken,
},
},
},
Expand Down
8 changes: 4 additions & 4 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ export enum SocialLoginProvider {
}

/**
* Social Login configurations, including Google, Facebook, and Apple.
* Login configurations, including Google, Facebook, and Apple.
*/
export interface SocialLoginConfigs {
export interface LoginConfigs {
google?:
| {
/**
Expand Down Expand Up @@ -237,9 +237,9 @@ export interface Configs {
*/
authentication?: Authentication
/**
* Social login configurations.
* Login configurations.
*/
socialLoginConfigs?: SocialLoginConfigs
loginConfigs?: LoginConfigs
}

// Challenge Related
Expand Down

0 comments on commit 2130669

Please sign in to comment.