-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signing out of a profile using Firebase methods
- Loading branch information
1 parent
26fefa9
commit 9e54673
Showing
10 changed files
with
415 additions
and
146 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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import firebase from 'firebase/compat/app'; | ||
import 'firebase/compat/auth'; | ||
|
||
const firebaseConfig = { | ||
apiKey: 'AIzaSyBe9QUzhoIEVFB69Rqt8mMbjUwRxjO9KKg', | ||
authDomain: 'web-app-b581f.firebaseapp.com', | ||
projectId: 'web-app-b581f', | ||
storageBucket: 'web-app-b581f.appspot.com', | ||
messagingSenderId: '868623960717', | ||
appId: '1:868623960717:web:e1dfe1b9f383dc100db0c4', | ||
}; | ||
|
||
firebase.initializeApp(firebaseConfig); | ||
|
||
export default firebase; |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
const { getDefaultConfig } = require('@expo/metro-config'); | ||
|
||
const defaultConfig = getDefaultConfig(__dirname); | ||
defaultConfig.resolver.assetExts.push('cjs'); | ||
|
||
module.exports = defaultConfig; |
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
This file was deleted.
Oops, something went wrong.
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
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,21 +1,24 @@ | ||
import { createSlice } from '@reduxjs/toolkit'; | ||
|
||
const state = { | ||
userId: null, | ||
login: null, | ||
stateChange: false, | ||
}; | ||
|
||
export const authSlice = createSlice({ | ||
name: 'auth', | ||
initialState: { | ||
userId: null, | ||
login: null, | ||
stateChange: null, | ||
}, | ||
initialState: state, | ||
reducers: { | ||
updateUserProfile: (state, { payload }) => ({ | ||
...state, | ||
userId: payload.userId, | ||
login: payload.login, | ||
}), | ||
authStateChange: (state, { payload }) => ({ | ||
authStateChangeUser: (state, { payload }) => ({ | ||
...state, | ||
stateChange: payload.stateChange, | ||
}), | ||
authSingOut: () => state, | ||
}, | ||
}); |
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