-
Notifications
You must be signed in to change notification settings - Fork 402
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
Undocumented required configuration "API_EXTERNAL_URL" #1194
Comments
On a similar note there are more things which I noticed while setting Gotrue up.
I guess these points depend on whether Gotrue is planned to be used as standalone application without the full supabase stack. If that's the case give me a sign and I might attempt to improve the points mentioned in this issue :) |
Hey @szczepad, thanks for pointing out these issues! wrt to your question:
Yes! gotrue can be used as a standalone application and you can self-host it without supabase. We'd welcome any help with improving the docs around this. |
Hey @kangmingtay ! However I didn't add the GOTRUE_ prefix to the values in the documentation as those do not seem to be set explicitely as envvars in configuration.go and I'm not sure whether this prefix might break settings in this scenario as there seems to be some implicit stuff going on in the envconfig lib. (See kelseyhightower/envconfig#148 ) |
## What kind of change does this PR introduce? Bug fix, setting sane defaults ## What is the current behavior? #1194 - If the configuration API_EXTERNAL_URL is not set requests to gotrue return 500 errors. This configuration was undocumented and only part of some examplary configurations. - If the URLPaths for the Mailer are not set they defaulted to / which by default is not the correct endpoint to handle verification requests. ## What is the new behavior? - API_EXTERNAL_URL needs to be set for gotrue to start. - URLPaths for Invite,Confirmation,Recovery and EmailChange are set to "/verify" by default instead of "/"
## What kind of change does this PR introduce? Bug fix, setting sane defaults ## What is the current behavior? supabase#1194 - If the configuration API_EXTERNAL_URL is not set requests to gotrue return 500 errors. This configuration was undocumented and only part of some examplary configurations. - If the URLPaths for the Mailer are not set they defaulted to / which by default is not the correct endpoint to handle verification requests. ## What is the new behavior? - API_EXTERNAL_URL needs to be set for gotrue to start. - URLPaths for Invite,Confirmation,Recovery and EmailChange are set to "/verify" by default instead of "/"
## What kind of change does this PR introduce? Bug fix, setting sane defaults ## What is the current behavior? supabase#1194 - If the configuration API_EXTERNAL_URL is not set requests to gotrue return 500 errors. This configuration was undocumented and only part of some examplary configurations. - If the URLPaths for the Mailer are not set they defaulted to / which by default is not the correct endpoint to handle verification requests. ## What is the new behavior? - API_EXTERNAL_URL needs to be set for gotrue to start. - URLPaths for Invite,Confirmation,Recovery and EmailChange are set to "/verify" by default instead of "/"
## What kind of change does this PR introduce? Bug fix, setting sane defaults ## What is the current behavior? supabase#1194 - If the configuration API_EXTERNAL_URL is not set requests to gotrue return 500 errors. This configuration was undocumented and only part of some examplary configurations. - If the URLPaths for the Mailer are not set they defaulted to / which by default is not the correct endpoint to handle verification requests. ## What is the new behavior? - API_EXTERNAL_URL needs to be set for gotrue to start. - URLPaths for Invite,Confirmation,Recovery and EmailChange are set to "/verify" by default instead of "/"
Bug report
Describe the bug
It seems like using GoTrue with the minimal configuration is not possible. While performing e.g. a request to login a user the following message is logged:
{"component":"api","level":"warning","method":"POST","msg":"parse \"\": empty url","path":"/token","referer":"$REFERRER","remote_addr":"$IP","request_url":"","time":"2023-07-21T09:31:17Z","timestamp":"2023-07-21T09:31:17Z"}
and the request returns with a http 500.The reason for this behaviour is that API_EXTERNAL_URL is not set but seems to be necessary (although it is allowed to be empty according to internal/conf/configuration.go )
Furthermore the readme does not refer to this parameter at all or mark this parameter as required.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
Expected behavior
System information
The text was updated successfully, but these errors were encountered: