In #80003 all the redirect and url stuff is still true... but we only do the redirect hop at the end when the user was logged out to begin with. If the user starts off logged in then there's no redirect on the server side and the url that the toolbar asked for inside the popup (https://sentry.io/toolbar/$org/$project/login-success/) will just load.
What's going to happen now:
If the user is not logged into sentry already:
Open a popup with url = https://sentry.io/toolbar/$org/$project/login-success/
User redirected into login flow, with ?redirect=.... appended
Login flow completes, user taken to https://$org.sentry.io/toolbar/$org/$project/login-success/ inside the popup
Popup can communicate with the iframe ✅
If the user is already logged into sentry:
Open a popup with url = https://sentry.io/toolbar/$org/$project/login-success/
https://sentry.io/toolbar/$org/$project/login-success/ loads as requested
NEW-> javascript redirect to https://$org.sentry.io/toolbar/$org/$project/login-success/ inside the popup
This is a followup to https://github.com/getsentry/sentry/pull/80003
In #80003 all the redirect and url stuff is still true... but we only do the redirect hop at the end when the user was logged out to begin with. If the user starts off logged in then there's no redirect on the server side and the url that the toolbar asked for inside the popup (
https://sentry.io/toolbar/$org/$project/login-success/
) will just load.What's going to happen now: If the user is not logged into sentry already:
https://sentry.io/toolbar/$org/$project/login-success/
?redirect=....
appendedhttps://$org.sentry.io/toolbar/$org/$project/login-success/
inside the popupIf the user is already logged into sentry:
https://sentry.io/toolbar/$org/$project/login-success/
https://sentry.io/toolbar/$org/$project/login-success/
loads as requestedhttps://$org.sentry.io/toolbar/$org/$project/login-success/
inside the popup