-
Notifications
You must be signed in to change notification settings - Fork 305
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
[FR] Auto sign in for a multiple logins with the same user #4616
Comments
Hi @dcp3450. To clarify the ask here, can you confirm whether the expectation is that if an end user has two apps open in the same browser instance (App A, App B) that signing in to App A will "refresh" App B automatically? |
@calebpollman No, they don't need to talk in that way. I see instances of what I'm trying to do:
What confuses me is all apps have the exact same subdomain/domain. So when the user logs in at one location (App A) it creates the local storage and cookies. When they access App B, it requires a log in even though they are the same domain and have access to the same local storage and cookies. Logging in at the second app creates a other set of storage and cookies. I verify the user is logged in via:
This is called when the user attempts to access a page that requires auth. If they aren't authenticated, then it kicks them out to the login. |
@calebpollman I looked over my code again and noticed, this is the code checking if the user is already authenticated:
The problem and assumptions still remain. The domains are the same just the code base at the route |
All the apps had the same user pool and identity pool IDs but they had different web client IDs. I gave them the same web client ID and login works as expected. |
Before creating a new issue, please confirm:
On which framework/platform are you having an issue?
Angular
Which UI component?
Authenticator
How is your app built?
custom-webpack 16
What browsers are you seeing the problem on?
No response
Which region are you seeing the problem in?
No response
Please describe your bug.
I have 5 applications that use the
@aws-amplify/ui-angular
package. Sign up / login works as expected. However, when a user logs into one application and attempts to view another they have to login again. All users are on the same userpool and identity pool. they are also on the same domain/subdomain as the route determines the app:company.myapp.com/app1
company.myapp.com/app2
company.myapp.com/app3
...
It was my understanding (based on an AWS doc I read somewhere) that if the user has logged in at one location via their cognito login and the domain was the same, they would be auto signed in.
If I need to grab an ID stored in a cookie and verify the user that way, that makes sense but the docs don't seem to suggest this.
What's the expected behaviour?
When the user logs in at one location with userpool creds and attempts to access a second location they don't have to login again. Their previous login at the same domain should allow them to go forward.
Help us reproduce the bug!
have to apps with the same domain/subdomain but different routes.
Code Snippet
// Put your code below this line.
Console log output
No response
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered: