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

RedirectTo in AuthorizeRequest and Code JSON field tag corrrected in TokenRequest #7

Merged

Conversation

daic0r
Copy link
Contributor

@daic0r daic0r commented Sep 29, 2024

What kind of change does this PR introduce?

This PR

  • adds a RedirectTo field to types.AuthorizeRequest. This will be passed along in a request to the /auth/v1/authorize endpoint.
  • corrects the name of the JSON field tag of Code in types.TokenRequest

What is the current behavior?

Currently, there is no RedirectTo field in types.AuthorizeRequest: #4
The field Code in types.TokenRequest has a wrong JSON name in the struct field tag: #5

What is the new behavior?

  • Callback route can be passed to the /auth/v1/authorize endpoint
  • Code exchange for PKCE will now work because the Code field's JSON name will be correct when /auth/v1/token is called.

Copy link
Collaborator

@kwoodhouse93 kwoodhouse93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution!

The change looks good, only one comment - can we rebase and scope it to only adding the redirect URL here, please? Another PR has addressed the auth_code fix 🙂

types/api.go Outdated Show resolved Hide resolved
@daic0r daic0r force-pushed the authorize_opts_with_url branch from 989d6cb to 6f7cdf8 Compare October 9, 2024 14:45
@kwoodhouse93 kwoodhouse93 merged commit f40c325 into supabase-community:main Oct 9, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants