The next problem.
I have a website:
but there are some third party websites that can be said:
data.example.comhelp.example.com
All of them are controlled by the same flask application. Now I want the user to be able to click on the login on any of these websites and log in to all of them. There are two mail requests right now:
example.com/api/loginexample.com/api/logout
Now the problem is that when you log in to example.com everything works beautifully. I even logged in to the subdomains themselves. Thanks, Mozilla. But when I enter one of the other subdomains, I get a response about the refusal due to domain mismatch, which makes perfect sense to me from the moment it occurred.
I know two solutions:
- When the subdomain is first redirected to the real domain and the user clicks the login again.
- Create
/api/login and /api/logout urls for each subdomain. The problem here is that the user needs to go to the address that he registered
Of course, method 2 would be better for the user.
Now the real question is, is there a way to log in from these subdomains without login/logout URLs for each domain?
Let me know if I need to clarify. Thanks at Advance.
source share