Class Auth
Namespace: haechi.face.unity.sdk.Runtime.Module
Assembly: cs.temp.dll.dll
Syntax
public class Auth : IAuth
Methods
BoraDirectSocialLogin(LoginProviderType, BoraPortalConnectRequest)
Directly sign-up(if new user) or login using social login and connect to bora portal if possible. Need to initialize face with environment, blockchain and api key first.
Pass the desired login provider to parameter.
For BoraPortalConnectRequest
parameter, please see This document.
Declaration
public Task<FaceLoginResponse> BoraDirectSocialLogin(LoginProviderType provider, BoraPortalConnectRequest boraPortalConnectRequest)
Parameters
Type | Name | Description |
---|---|---|
LoginProviderType | provider | |
BoraPortalConnectRequest | boraPortalConnectRequest |
Returns
Type | Description |
---|---|
Task<FaceLoginResponse> | FaceLoginResponse. Unique user ID using on Face server and wallet address. |
Exceptions
Type | Condition |
---|---|
haechi.face.unity.sdk.Runtime.Exception.AddressVerificationFailedException | Throws AddressVerificationFailedException when address verification fails. |
BoraLogin(List<LoginProviderType>, BoraPortalConnectRequest)
Sign-up(if new user) or login function and connect to bora portal if possible. Need to initialize face with environment, blockchain and api key first.
You can pass all options contained in LoginProviderType.
Or you can just pass empty or null values.
For BoraPortalConnectRequest
parameter, please see This document.
Declaration
public Task<FaceLoginResponse> BoraLogin(List<LoginProviderType> providers, BoraPortalConnectRequest boraPortalConnectRequest)
Parameters
Type | Name | Description |
---|---|---|
List<LoginProviderType> | providers | |
BoraPortalConnectRequest | boraPortalConnectRequest |
Returns
Type | Description |
---|---|
Task<FaceLoginResponse> | FaceLoginResponse. Unique user ID using on Face server and wallet address. |
Exceptions
Type | Condition |
---|---|
haechi.face.unity.sdk.Runtime.Exception.AddressVerificationFailedException | Throws AddressVerificationFailedException when address verification fails. |
BoraLoginWithIdToken(FaceLoginIdTokenRequest, BoraPortalConnectRequest)
login with id token and connect bora portal if possible. Need to initialize face with environment, blockchain and api key first.
Pass the desired login provider to parameter.
For BoraPortalConnectRequest
parameter, please see This document.
Declaration
public Task<FaceLoginResponse> BoraLoginWithIdToken(FaceLoginIdTokenRequest loginIdTokenRequest, BoraPortalConnectRequest boraPortalConnectRequest)
Parameters
Type | Name | Description |
---|---|---|
FaceLoginIdTokenRequest | loginIdTokenRequest | |
BoraPortalConnectRequest | boraPortalConnectRequest |
Returns
Type | Description |
---|---|
Task<FaceLoginResponse> | FaceLoginResponse. Unique user ID using on Face server and wallet address. |
Exceptions
Type | Condition |
---|---|
haechi.face.unity.sdk.Runtime.Exception.AddressVerificationFailedException | Throws AddressVerificationFailedException when address verification fails. |
DirectSocialLogin(LoginProviderType)
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.
Declaration
public Task<FaceLoginResponse> DirectSocialLogin(LoginProviderType provider)
Parameters
Type | Name | Description |
---|---|---|
LoginProviderType | provider |
Returns
Type | Description |
---|---|
Task<FaceLoginResponse> | FaceLoginResponse. Unique user ID using on Face server and wallet address. |
Exceptions
Type | Condition |
---|---|
haechi.face.unity.sdk.Runtime.Exception.AddressVerificationFailedException | Throws AddressVerificationFailedException when address verification fails. |
DirectSocialLogin(String)
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 as host value to parameter.
Declaration
public Task<FaceLoginResponse> DirectSocialLogin(string provider)
Parameters
Type | Name | Description |
---|---|---|
String | provider |
Returns
Type | Description |
---|---|
Task<FaceLoginResponse> | FaceLoginResponse. Unique user ID using on Face server and wallet address. |
Exceptions
Type | Condition |
---|---|
haechi.face.unity.sdk.Runtime.Exception.AddressVerificationFailedException | Throws AddressVerificationFailedException when address verification fails. |
IsLoggedIn()
Check is logged in
Declaration
public bool IsLoggedIn()
Returns
Type | Description |
---|---|
Boolean | Boolean value. If logged in, returns true. |
Login(List<LoginProviderType>)
Sign-up(if new user) or login function. Need to initialize face with environment, blockchain and api key first.
You can pass all options contained in LoginProviderType. Or you can just pass empty or null values.
Declaration
public Task<FaceLoginResponse> Login(List<LoginProviderType> providers)
Parameters
Type | Name | Description |
---|---|---|
List<LoginProviderType> | providers |
Returns
Type | Description |
---|---|
Task<FaceLoginResponse> | FaceLoginResponse. Unique user ID using on Face server and wallet address. |
Exceptions
Type | Condition |
---|---|
haechi.face.unity.sdk.Runtime.Exception.AddressVerificationFailedException | Throws AddressVerificationFailedException when address verification fails. |
LoginWithIdToken(FaceLoginIdTokenRequest)
login with id token. Need to initialize face with environment, blockchain and api key first.
Pass the desired login provider to parameter.
Declaration
public Task<FaceLoginResponse> LoginWithIdToken(FaceLoginIdTokenRequest loginIdTokenRequest)
Parameters
Type | Name | Description |
---|---|---|
FaceLoginIdTokenRequest | loginIdTokenRequest |
Returns
Type | Description |
---|---|
Task<FaceLoginResponse> | FaceLoginResponse. Unique user ID using on Face server and wallet address. |
Exceptions
Type | Condition |
---|---|
haechi.face.unity.sdk.Runtime.Exception.AddressVerificationFailedException | Throws AddressVerificationFailedException when address verification fails. |
Logout()
Log out Face Wallet.
Declaration
public Task<FaceRpcResponse> Logout()
Returns
Type | Description |
---|---|
Task<FaceRpcResponse> | FaceRpcResponse. Result is boolean value. |