-
-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auth Provider is missing. Make sure, you are using this component inside the auth provider. #1579
Open
2 tasks done
Labels
question
Further information is requested
Comments
I'm having the same issue, but with using the @auth-kit/react-router library and private routes. Any ideas on how to fix it? packages
main.tsx const store = createStore<{username: string}>({
authName:'_auth',
authType:'cookie',
cookieDomain: window.location.hostname,
cookieSecure: window.location.protocol === 'https:',
});
ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
<AuthProvider
store={store}
>
<BrowserRouter>
<ThemeProvider>
<AppProvider>
<App/>
</AppProvider>
</ThemeProvider>
</BrowserRouter>
</AuthProvider>
</React.StrictMode>,
) App.tsx export default function App () {
return (
<Routes>
<Route path="/login" element={<Login/>}/>
<Route path="/" element={
<RequireAuth fallbackPath="/login">
<DashboardIndex/>
</RequireAuth>
}/>
<Route path="/products" element={
<RequireAuth fallbackPath="/login">
<ProductIndex/>
</RequireAuth>
}/>
<Route path="*" element={<NotFountIndex/>}/>
</Routes>
)
} |
Same issue, reverted to ^2.12.7 to resolve it. |
@gb1 which react-router version use? |
Here's my current dependencies, however I did run
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
packages
During the authorization process, I came across an error that my
AuthProvider
was missing, I double-checked everything and this should have worked, starting fromv3.0.1
everything worked fine for me until the moment thatreact-auth-kit/createRefresh
was missing in this version, I updated to the^3.0.2-alpha.19
version and came across this, help me what to dostore
Screenshots
The text was updated successfully, but these errors were encountered: