Skip to content
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

Customize where to redirect after GitHub OAuth flow #43

Open
bryanhuhta opened this issue Jul 11, 2024 · 0 comments
Open

Customize where to redirect after GitHub OAuth flow #43

bryanhuhta opened this issue Jul 11, 2024 · 0 comments
Labels
bug Something isn't working GA good first issue Good for newcomers needs refinement The issue is confirmed but it needs prioritising and a better definition of the criteria

Comments

@bryanhuhta
Copy link
Contributor

When authorizing Grafana Pyroscope with GitHub, we provide a redirect URI which points to where the flow should send us back to after authorizing. At the moment, the URI is hardcoded to be the root url where Grafana is running:

url.searchParams.set(
'state',
btoa(
JSON.stringify({
redirect_uri: window.location.origin,
nonce,
})
)
);

In general, this works. Almost all of our deployments run Grafana at the root url (e.g. tenant.grafana.net). However, this provides a bad experience (possibly even breaking the login flow) when Grafana is not being run at the root of the url (e.g. tenant.grafana.net/grafana). We should make it possible to configure specifically where the redirect will land after the OAuth flow is complete. Ideally, this should be a setting in jsonData of the app plugin.

@bryanhuhta bryanhuhta added bug Something isn't working good first issue Good for newcomers labels Jul 11, 2024
@grafakus grafakus added the needs refinement The issue is confirmed but it needs prioritising and a better definition of the criteria label Aug 27, 2024
@grafakus grafakus added the GA label Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working GA good first issue Good for newcomers needs refinement The issue is confirmed but it needs prioritising and a better definition of the criteria
Projects
None yet
Development

No branches or pull requests

2 participants