[RFC] Auth Redirect
See original GitHub issueStatus: Open for comments
Need
In the Auth plugin in Backstage, when a request comes for authentication, Backstage detects the redirect URL from the app-config.yaml file which can be just an URL. At Spotify, we deploy UIs in a test environment that has a different URL than the production one. We need Backstage to be able to redirect back to a list of valid URLs.
Current state
Now we can have only one URL as the app.baseUrl in the app-config.yaml file.
Proposal
I propose to add a possibility to handle the redirection by keeping the original URL in a stateless way (in OAuth you generally pass the URL to redirect back as a query param). Also accepting a pattern for defining valid URLs, like *.example.com which provides the possibility of passing a list of valid URLs.
Alternatives
Risks
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:7 (7 by maintainers)
Top Results From Across the Web
RFC 5685 - Redirect Mechanism for the Internet Key ...
Redirect Mechanism for the Internet Key Exchange Protocol Version 2 (IKEv2) (RFC 5685, November 2009)
Read more >RFC 6749: The OAuth 2.0 Authorization Framework
This specification replaces and obsoletes the OAuth 1.0 protocol described in RFC 5849. Status of This Memo This is an Internet Standards Track...
Read more >Why does OAuth RFC require the redirect_uri to be passed ...
When requesting authorization using the authorization code grant type, the client can specify a redirection URI via the "redirect_uri" parameter.
Read more >[RFC] Redirection to login should be done in the authProvider
If the authProvider delegates login and check to a third-party server (e.g. OAuth), then it should be able to manage the login form...
Read more >Redirect URI (reply URL) restrictions - Microsoft Entra
A redirect URI, or reply URL, is the location where the authorization server sends the user once the app has been successfully authorized ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hmm.
Usually you would only need one such param per deployment right? What we usually do is to have config that changes per deployment; by merging in several config files and/or using env variable substitution in the config. Could you set the base url and/or redirect to be something like
${TESTRUNNER_DEPLOYMENT_URL}/api/...in anapp-config.testrunner.yamlthat’s only used in the test env? Or does that not help with this situationClosed by #6772