Fully working OAuth flow without any external provider + Magic Links
service-go-user/domain/login/provider.go
file.
The OAuth implementation does not depend on any external providers. It’s built using the golang.org/x/oauth2
library.
GOOGLE_CLIENT_ID
and GOOGLE_CLIENT_SECRET
environment variables.GITHUB_CLIENT_ID
and GITHUB_CLIENT_SECRET
environment variables.log
option is chosen for email configuration, the magic link will appear in the application logs.
GITHUB_CLIENT_ID
and GITHUB_CLIENT_SECRET
, you need to create a new GitHub App:
GitHub App name
, Homepage URL
, Callback URL
.Request user authorization (OAuth) during installation
.Active
on Webhook
.Any account
on Where can this GitHub App be installed?
.Client ID
and Client Secret
.GOOGLE_CLIENT_ID
and GOOGLE_CLIENT_SECRET
, you need to create a new Google Project:
Project name
and click on “Create”.Name
, Authorized redirect URIs
and click on “Create”.Client ID
and Client Secret
.