mirror of
https://gitlab.com/wheres-the-tp/ui-mobile.git
synced 2026-01-25 10:04:56 -06:00
49 lines
1.1 KiB
JavaScript
49 lines
1.1 KiB
JavaScript
// //@flow
|
|
|
|
// //$FlowFixMe
|
|
// import { FBLoginManager } from 'react-native-facebook-login';
|
|
|
|
// export type FacebookProfile = {
|
|
// email: string,
|
|
// first_name: string,
|
|
// last_name: string,
|
|
// name: string,
|
|
// picture: {
|
|
// data: {
|
|
// height: number,
|
|
// is_silhouette: boolean,
|
|
// url: string,
|
|
// width: number,
|
|
// },
|
|
// },
|
|
// };
|
|
|
|
// export type FacebookCredentials = {
|
|
// token: string,
|
|
// tokenExpirationDate: string,
|
|
// userId: string,
|
|
// };
|
|
|
|
// export type FacebookAuthResponse = {
|
|
// credentials: FacebookCredentials,
|
|
// declinedPermissions: Array<any>,
|
|
// eventName: string,
|
|
// profile: string,
|
|
// provider: string,
|
|
// type: string,
|
|
// };
|
|
|
|
// export type FacebookAuth = {
|
|
// credentials: FacebookCredentials,
|
|
// profile: FacebookProfile,
|
|
// };
|
|
|
|
// export const authFacebook = async (): Promise<FacebookAuth> => {
|
|
// return new Promise((resolve, reject) => {
|
|
// FBLoginManager.loginWithPermissions(['email'], (error: string, data: FacebookAuthResponse) => {
|
|
// return error
|
|
// ? reject(error)
|
|
// : resolve({ credentials: data.credentials, profile: JSON.parse(data.profile) });
|
|
// });
|
|
// });
|
|
// };
|