Skip to content

Commit

Permalink
logout with firebase
Browse files Browse the repository at this point in the history
  • Loading branch information
zrwusa committed Nov 6, 2021
1 parent 8915333 commit 1271bc5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
7 changes: 2 additions & 5 deletions src/providers/auth-labor/AuthLaborContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ import {EventRegister} from 'react-native-event-listeners';
import {firebase} from '../../firebase/firebase';
import * as Facebook from 'expo-facebook';

// import * as AppAuth from "expo-app-auth";
// // When configured correctly, URLSchemes should contain your REVERSED_CLIENT_ID
// const {URLSchemes} = AppAuth;
// console.log('---URLSchemes', URLSchemes)

const config: AuthContextConfig = {
loginAPIMethod: 'PUT',
loginAPIPath: '/api/auth/login',
Expand Down Expand Up @@ -172,6 +167,8 @@ const bunnyRefreshAuth = async (): Promise<BizLogicResult> => {
};

const logOut = async (triggerType?: TriggerType) => {
// TODO not tested
const res = await firebase.auth().signOut();
const {success, message} = await removePersistenceAuth();
let result: BizLogicResult;
if (success) {
Expand Down
4 changes: 1 addition & 3 deletions src/screens/Home/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ import {Card, makeContainerStyles} from '../../containers';
import {useAuthLabor} from '../../providers/auth-labor';
import {useDispatch} from 'react-redux';
import {collectSysError} from '../../store/actions';
import {Divider} from '../../components/Divider';
import {Divider, InlineJump} from '../../components';
import {makeStyles} from './styles';
import {InlineJump} from '../../components/InlineJump';
import {useBunnyKit} from '../../hooks/bunny-kit';

type HomeRouteProp = RouteProp<RootStackParam, 'Home'>;
Expand All @@ -21,7 +20,6 @@ export interface HomeScreenProps {
navigation: HomeNavigationProp;
}


function HomeScreen({navigation}: HomeScreenProps) {
const {sizeLabor, themeLabor, t, wp} = useBunnyKit();
const dispatch = useDispatch();
Expand Down

0 comments on commit 1271bc5

Please sign in to comment.