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

fix: /generate_link endpoint excluded from authorized email restriction #1779

Conversation

byrnehollander
Copy link

What kind of change does this PR introduce?

Bug fix.

What is the current behavior?

The /generate_link endpoint is currently failing with

Email address "[email protected]" cannot be used as it is not authorized

See: https://github.com/orgs/supabase/discussions/29370#discussioncomment-10781231

What is the new behavior?

Users can use the generateLink function even if they don't have a custom SMTP provider configured.

@byrnehollander byrnehollander requested a review from a team as a code owner September 28, 2024 03:33
Copy link
Member

@kangmingtay kangmingtay left a comment

Choose a reason for hiding this comment

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

hi @byrnehollander, this is fixed in #1778 and we'll deployed the latest version to the platform soon

@byrnehollander byrnehollander deleted the bh/fix-generate-link-failure branch September 28, 2024 15:16
@byrnehollander
Copy link
Author

byrnehollander commented Sep 28, 2024

Hi @kangmingtay, thanks for your response. I will close out this PR if you're confident the issue is fixed.

I am not a Go expert and I'm not familiar with this codebase, so I defer to you. But I am concerned that the error code I received – Email address "[email protected]" cannot be used as it is not authorized appears to be first introduced in #1778

I am taking another look at this and perhaps the issue is that /generate_link is a POST:

r.Post("/generate_link", api.adminGenerateLink)

And your change limits the impact to GET and DELETE requests.

Edit:

Ah nevermind, I see that's /admin prefix OR GET OR DELETE.

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