Open Seth-McKilla opened 3 years ago
Also, I meant to include my redux store configuration:
import { createStore, applyMiddleware } from "redux";
import thunk from "redux-thunk";
import { getFirebase } from "react-redux-firebase";
import { composeWithDevTools } from "redux-devtools-extension";
import initialState from "./initialState";
import rootReducer from "./reducers/rootReducer";
const middleware = [thunk.withExtraArgument(getFirebase)];
const composedEnhancer = composeWithDevTools(applyMiddleware(...middleware));
const store = createStore(rootReducer, initialState, composedEnhancer);
export { initialState, store };
And my root reducer looks like this:
import { combineReducers } from "redux";
import { firebaseReducer } from "react-redux-firebase";
import { constants } from "react-redux-firebase";
const appReducer = combineReducers({
firebase: firebaseReducer,
// other reducers here omitted for sake of brevity
});
const rootReducer = (state, action) => {
if (action.type === constants.actionTypes.LOGOUT) {
return appReducer(undefined, action);
}
return appReducer(state, action);
};
export default rootReducer;
Hello,
I'm trying to fetch custom user claims with the rrfConfig flags of "enableClaims: true" & "userProfile: users" but it is failing to fetch the custom claims. I've confirmed that the custom user claims are being created on the back with the admin SDK but they are not being set in state.firebase.profile.token.claims.
I'm expecting the following for the profile data:
But am instead receiving:
Here is my current index.js file for the application:
The config file:
And my custom user claim setting on the backend for email/password and Google logins:
I can verify that the claims are set by calling this:
Some FYI's: I'm using Chrome, version 3.10.0 of react-redux-firebase, and plan to use these custom claims for HOC Authentication routing.
Any help with this matter would be very much appreciated as it is causing me quite the headache!
Thanks! Seth