-
Notifications
You must be signed in to change notification settings - Fork 10
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
login at a particular route "/login" #32
Comments
Could you elaborate on this? Currently the behaviour is that whatever you have wrapped in |
like currently if we put out web url like www.xyz.com, it redirects to azure login but if we want for application to login only on the click of a button, how should we do it. |
now when we enter www.xyz.com, it should first redirect to welcome page where on click of a button it should perform the login step. |
I have the exact same question, I can't figure out how to do it. Currenly the OIDC login flow is triggered when the 'AppWithAuth' component is mounted. It will either redirect to the IdentityServer login page, or detect that the user is already logged in and give access to the protected wrapped component. What I would like is to have a 'Login' button in my UI, which would trigger the login flow as described above. |
Hi @Raviteza7796 and @AjaySewradj - sorry for the late response here. To achieve what you want, I think you can do something like this: // userManager / AppWithAuth setup removed for brevity
<Router>
<Switch>
<Route
path="/callback"
render={routeProps => (
<Callback
onSuccess={user => {
// `user.state` will reflect the state that was passed in via signinArgs.
routeProps.history.push('/route-inside-app')
}}
userManager={userManager}
/>
)}
/>
<Route exact path="/" component={PageWithLoginButton} />
<AppWithAuth />
</Switch>
</Router> Someone going to |
Can we change the default login at route "/" to "/login" for the application?
The text was updated successfully, but these errors were encountered: