@aigens/aigens-sdk-apple-sign-in
v0.5.0
Published
Aigens SDK apple sign in
Downloads
53
Readme
aigens-sdk-apple-sign-in
Aigens SDK Apple Sign IN
Install
npm install aigens-sdk-apple-sign-in
npx cap sync
API
getCanShowButton()
getCanShowButton() => Promise<{ result: boolean; }>
Returns: Promise<{ result: boolean; }>
login()
login() => Promise<AppleSignInResult>
Returns: Promise<AppleSignInResult>
checkStateWithUserIdentifier(...)
checkStateWithUserIdentifier(options: { userId: string; }) => Promise<AppleUserState>
| Param | Type |
| ------------- | -------------------------------- |
| options
| { userId: string; } |
Returns: Promise<AppleUserState>
Interfaces
AppleSignInResult
state : 1 , successs state : -1 , fail
| Prop | Type |
| ------------- | ------------------------------------------------------- |
| state
| number |
| errCode
| number |
| errDesc
| string |
| info
| AppleUserInfo |
AppleUserInfo
| Prop | Type |
| ---------------------- | ------------------- |
| state
| string |
| userIdentifier
| string |
| email
| string |
| identityToken
| string |
| authCode
| string |
| realUserStatus
| string |
| familyName
| string |
| givenName
| string |
| nickname
| string |
| middleName
| string |
| namePrefix
| string |
| nameSuffix
| string |
| familyName_phone
| string |
| givenName_phone
| string |
| nickname_phone
| string |
| namePrefix_phone
| string |
| nameSuffix_phone
| string |
| middleName_phone
| string |
AppleUserState
state : 1 , Apple ID Credential is valid state : -1 , Apple ID Credential revoked, handle unlink state : -2 , Credential not found, show login UI state : -3 , Unknow
| Prop | Type |
| ------------- | ------------------- |
| state
| number |
| message
| string |