在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:netlify/gotrue开源软件地址:https://github.com/netlify/gotrue开源编程语言:Go 98.5%开源软件介绍:User management for APIs GoTrue is a small open-source API written in Golang, that can act as a self-standing API service for handling user registration and authentication for Jamstack projects. It's based on OAuth2 and JWT and will handle user signup, authentication and custom user data. ConfigurationYou may configure GoTrue using either a configuration file named Top-LevelGOTRUE_SITE_URL=https://example.netlify.com/
The base URL your site is located at. Currently used in combination with other settings to construct URLs used in emails.
The shared secret with an operator (usually Netlify) for this microservice. Used to verify requests have been proxied through the operator and the payload values can be trusted.
When signup is disabled the only way to create new users is through invites. Defaults to
Header on which to rate limit the APIGOTRUE_API_HOST=localhost
PORT=9999
Hostname to listen on.
Port number to listen on. Defaults to
Controls what endpoint Netlify can access this API on.
If you wish to inherit a request ID from the incoming request, specify the name in this value. DatabaseGOTRUE_DB_DRIVER=mysql
DATABASE_URL=root@localhost/gotrue
Chooses what dialect of database you want. Must be
Connection string for the database.
Adds a prefix to all table names. Migrations Note Migrations are not applied automatically, so you will need to run them after you've built gotrue.
LoggingLOG_LEVEL=debug # available without GOTRUE prefix (exception)
GOTRUE_LOG_FILE=/var/log/go/gotrue.log
Controls what log levels are output. Choose from
If you wish logs to be written to a file, set OpentracingCurrently, only the Datadog tracer is supported. GOTRUE_TRACING_ENABLED=true
GOTRUE_TRACING_HOST=127.0.0.1
GOTRUE_TRACING_PORT=8126
GOTRUE_TRACING_TAGS="tag1:value1,tag2:value2"
GOTRUE_SERVICE_NAME="gotrue"
Whether tracing is enabled or not. Defaults to
The tracing destination.
The port for the tracing host.
A comma separated list of key:value pairs. These key value pairs will be added as tags to all opentracing spans.
The name to use for the service. JSON Web Tokens (JWT)GOTRUE_JWT_SECRET=supersecretvalue
GOTRUE_JWT_EXP=3600
GOTRUE_JWT_AUD=netlify
The secret used to sign JWT tokens with.
How long tokens are valid for, in seconds. Defaults to 3600 (1 hour).
The default JWT audience. Use audiences to group users.
The name of the admin group (if enabled). Defaults to
The default group to assign all new users to. External Authentication ProvidersWe support GOTRUE_EXTERNAL_GITHUB_CLIENT_ID=myappclientid
GOTRUE_EXTERNAL_GITHUB_SECRET=clientsecretvaluessssh No external providers are required, but you must provide the required values if you choose to enable any.
Whether this external provider is enabled or not
The OAuth2 Client ID registered with the external provider.
The OAuth2 Client Secret provided by the external provider when you registered.
The URI a OAuth2 provider will redirect to with the
The base URL used for constructing the URLs to request authorization and access tokens. Used by Sending email is not required, but highly recommended for password recovery. If enabled, you must provide the required values below. GOTRUE_SMTP_HOST=smtp.mandrillapp.com
GOTRUE_SMTP_PORT=587
GOTRUE_SMTP_USER[email protected]
GOTRUE_SMTP_PASS=correcthorsebatterystaple
GOTRUE_SMTP_ADMIN_EMAIL[email protected]
GOTRUE_MAILER_SUBJECTS_CONFIRMATION="Please confirm"
The
The mail server hostname to send emails through.
The port number to connect to the mail server on.
If the mail server requires authentication, the username to use.
If the mail server requires authentication, the password to use.
Controls the minimum amount of time that must pass before sending another signup confirmation or password reset email. The value is the number of seconds. Defaults to 900 (15 minutes).
If you do not require email confirmation, you may set this to
URL path to use in the user invite email. Defaults to
URL path to use in the signup confirmation email. Defaults to
URL path to use in the password reset email. Defaults to
URL path to use in the email change confirmation email. Defaults to
Email subject to use for user invite. Defaults to
Email subject to use for signup confirmation. Defaults to
Email subject to use for password reset. Defaults to
Email subject to use for email change confirmation. Defaults to
URL path to an email template to use when inviting a user.
Default Content (if template is unavailable): <h2>You have been invited</h2>
<p>You have been invited to create a user on {{ .SiteURL }}. Follow this link to accept the invite:</p>
<p><a href="{{ .ConfirmationURL }}">Accept the invite</a></p>
URL path to an email template to use when confirming a signup.
Default Content (if template is unavailable): <h2>Confirm your signup</h2>
<p>Follow this link to confirm your user:</p>
<p><a href="{{ .ConfirmationURL }}">Confirm your mail</a></p>
URL path to an email template to use when resetting a password.
Default Content (if template is unavailable): <h2>Reset Password</h2>
<p>Follow this link to reset the password for your user:</p>
<p><a href="{{ .ConfirmationURL }}">Reset Password</a></p>
URL path to an email template to use when confirming the change of an email address.
Default Content (if template is unavailable): <h2>Confirm Change of Email</h2>
<p>Follow this link to confirm the update of your email from {{ .Email }} to {{ .NewEmail }}:</p>
<p><a href="{{ .ConfirmationURL }}">Change Email</a></p>
Url of the webhook receiver endpoint. This will be called when events like
Shared secret to authorize webhook requests. This secret signs the JSON Web Signature of the request. You should use this to verify the integrity of the request. Otherwise others can feed your webhook receiver with fake data.
How often GoTrue should try a failed hook.
Time between retries (in seconds).
Which events should trigger a webhook. You can provide a comma separated list.
For example to listen to all events, provide the values EndpointsGoTrue exposes the following endpoints:
TODO
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论