I'm using the AuthProvider in react-admin with an OIDC solution. Everything works, except if users click on a specific site like myserver.com/cars/1 then they are redirected to login and after login, they will go to the start page instead of myserver.com/cars/1. How can I achieve that the AuthProvider remembers the original site?
Related
I am trying to set up a working example of linking accounts to my sample app. I am currently using the react example found here as my base. I have looked over the docs and the example of linking an account with Lock, but I'm not sure how to apply that to the react example I am working with. I have also looked at the API for linking a user account here.
Here are the use cases I am trying to work around:
There would be a user who creates a new account on my site using Google. Then they decide they want to add another social login via GitHub to that same account. They clicks a button that allows them to login via GitHub and then it redirects back to their account page and they can now login to the one account with either their Google login or GitHub.
There would be a user who creates a new account on my site using Google. Another day they create another new account on my site using GitHub. Later they realize that they mistakenly made two accounts and want to merge them. They login to either account then click a button that allows them to login to the other account and then they are redirected back to their now merged account.
I think the API would be my best option, but I'm not sure how to obtain the SECONDARY_ACCOUNT_JWT OR THE SECONDARY_ACCOUNT_USER_ID. How do I get the user to log in to their other account? When I try to redirect to the login page when a user is already logged in it just redirects back to the page I have set to redirect after login.
Hey there Camiblanch!
You could link the accounts together if they share the same email through a rule. Attached is an example that may help you in your quest. Thanks!
https://auth0.com/rules/link-users-by-email
So, I'm developping a react app with Azure Active Directory authentication. The react app internally uses HashRouter. My url looks like this
https://example.com/#/
Now when the user clicks on this link from an email he would go through the azure authentication and if authorized will be redirected to the landing page which is
https://example.com/#/
However, if the user clicks on a link that looks like https://example.com/#/xyz - this still redirects to https://example.com/#/ and not to the page xyz. I think this is an issue with incorrect replyurls but I'm not sure.
Any help would be appreciated!!
I am able to allow users to login using Facebook login API into my website, but every time they login, they go back to the homepage. I want the user to come back to the same page they where in when they login, not to go to the homepage.
Can anyone advise how this is done? I am using PHP SDK3.
What I am trying to accomplish should be straight forward but since I have no experience in web development I would be more than happy to get some insights on best practices to accomplish user redirection from home page to dashboard if user is logged in.
Home page is a static WordPress site which is run in a docker container.
Dashboard is a single page application developed with AngularJS.
Nginx is used as a reverse proxy.
Authentication is basically a JWT. When user loggs in JWT is stored in Cookie.
If cookie is set user should be redirected to dashboard. Otherwise home page should be returned.
Should I configure Nginx to check for a cookie when accessing domain.com/ and redirect to app.domain.com if cookie exists?
what you are describing is a scenario where you need to go to home page and check whether User is Authenticated there, and redirect -before showing the homepage- if the user is authenticated from within the homepage code.
So today, I tried playing with Facebook's OAuth2 in my AngularJS application. I was able to make an activity work by clicking a Like button in my app. I'm also able to check if I'm logged in to Facebook using FB.getLoginStatus(). So my question is, if we currently have a login page, what is the ideal user experience when combining it with Facebook?
Do you display Facebook login page then goes back to your original login(this is what is happening on my application right now)
Do you display Facebook login page then once you've been logged in, bypass your original login page and allow the app to bring you directly to the main application. But how do I find out the facebook username that was used to log in?
any more ideas?