Skip to content

Commit

Permalink
Update Google bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
hlynurstef authored and FiberJW committed Oct 27, 2019
1 parent 85ca4c3 commit 77eb022
Showing 1 changed file with 33 additions and 12 deletions.
45 changes: 33 additions & 12 deletions packages/reason-expo/src/Google.re
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) = "";

0 comments on commit 77eb022

Please sign in to comment.