-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
85ca4c3
commit 77eb022
Showing
1 changed file
with
33 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,41 @@ | ||
[@bs.deriving abstract] | ||
type logInAsyncOptions = { | ||
behavior: string, | ||
scopes: array(string), | ||
androidClientId: string, | ||
type logInConfig = { | ||
[@bs.optional] | ||
iosClientId: string, | ||
androidStandaloneAppClientId: string, | ||
[@bs.optional] | ||
androidClientId: string, | ||
[@bs.optional] | ||
iosStandaloneAppClientId: string, | ||
webClientId: string, | ||
[@bs.optional] | ||
androidStandaloneAppClientId: string, | ||
[@bs.optional] | ||
scopes: array(string), | ||
[@bs.optional] | ||
redirectUrl: string, | ||
[@bs.optional] | ||
mutable accessToken: string, | ||
}; | ||
|
||
type profileInformation('profileInformationType) = 'profileInformationType; | ||
type logInResult = { | ||
. | ||
"_type": string, | ||
"accessToken": string, | ||
"idToken": string, | ||
"refreshToken": string, | ||
"user": googleUser, | ||
} | ||
and googleUser = { | ||
. | ||
"id": string, | ||
"name": string, | ||
"givenName": string, | ||
"familyName": string, | ||
"photoUrl": string, | ||
"email": string, | ||
}; | ||
|
||
[@bs.deriving abstract] | ||
type logInAsyncResult('logInAsyncResultType) = 'logInAsyncResultType; | ||
[@bs.module "expo-google-app-auth"] | ||
external logInAsync: logInConfig => Js.Promise.t(logInResult) = ""; | ||
|
||
[@bs.module "expo-google-app-auth"] | ||
external logInAsync: | ||
logInAsyncOptions => Js.Promise.t(logInAsyncResult('logInAsyncResultType)) = | ||
""; | ||
external logOutAsync: logInConfig => Js.Promise.t('a) = ""; |