Classes
Methods
# async directSocialLogin(provider) → {Promise.<FaceLoginResponse>}
Directly sign-up(if new user) or login using social login. Need to initialize face with environment, blockchain and api key first.
Pass the desired login provider to parameter.
Parameters:
Name | Type | Description |
---|---|---|
provider |
LoginProviderType
|
'google.com' | 'facebook.com' | 'apple.com' |
FaceLoginResponse. Unique user ID using on Face server and wallet address.
Promise.<FaceLoginResponse>
# async getCurrentUser() → {Promise.<FaceLoginResponse>}
Return user information.
Promise.<FaceLoginResponse>
# async login() → {Promise.<FaceLoginResponse>}
Sign-up(if new user) or login function. Need to initialize face with environment, blockchain and api key first.
You can choose three options, Google, Facebook, and Apple login.
FaceLoginResponse. Unique user ID using on Face server and wallet address.
Promise.<FaceLoginResponse>
# async loginWithIdToken(loginWithIdTokenRequest) → {Promise.<FaceLoginResponse>}
Login using the idToken published from social providers and Signature. Need to initialize face with environment, blockchain and api key first. You can make a Signature using Face Wallet SDK API Secret.
Pass the the idToken and Signature to parameters.
Parameters:
Name | Type | Description |
---|---|---|
loginWithIdTokenRequest |
LoginWithIdTokenRequest
|
FaceLoginResponse. Unique user ID using on Face server and wallet address.
Promise.<FaceLoginResponse>
# async logout() → {Promise.<void>}
Log out Face Wallet.
It will be resolved after successful logout.
Promise.<void>