Vídeo: https://youtu.be/Uc8mPuaNGqM
- Acesse https://github.com/settings/profile
- Clique em "Developer settings"
- Selecione "OAuth Apps"
- Clique "New OAuth App"
- Preencha os campos
- Application Name: "feltex-springboot-auth2"
- Homepage URL: "http://localhost:8080"
- Authorization callback URL: "http://localhost:8080/login/oauth2/code/github"
- Clique "Register application"
- Clique em "generate a new client secret"
- Copie o código gerado d5d32c3c804ec8e20d6d7852f0ecc43af619821c
- Selecione sua aplicação
- Copie o Client Id/Secretd
https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/authorizing-oauth-apps
Selecione o seu projeto
- Marque a opção "External"
- Preencha o nome da usa aplicação "App Name", "User Support email", "Developer Contact information"
- Clique em "Save and Continue".
- Clique em "ADD OR REMOVE SCOPES", selecione a primeira opcão
- "See your primary Google Account email address" e clique em Update.
- Em seguida: Save and Update
- Adicione usuarios de testes que poderem usar a aplicação [email protected] Clique em "add"
- Selecione "Save and Continue".
- Por fim confirme os dados no último passo e clique no botão para voltar ao Dashboard.
- Selecione a opaćo "Credentials"
- Selecione Create Credentials
- Selecione "OAuth Client Id"
- Selectione Web Application
- Preencha os campos
- Application Type: Selectione Web Application
- Name: "My App"
- "Authorized JavaScript origins": http://localhost:8080
- "Authorized redirect URI": http://localhost:8080/login/oauth2/code/google
- Clique em "Create"
- Você terá a općao de fazer download das credenciais.
{
"web":
{
"client_id": "66998749621-pu8bn2n96e0c1lpes563j6hfngpsqcl.apps.googleusercontent.com",
"project_id": "hallowed-moment-684",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_secret": "745699541_pv8YPmiYTcMNNHtDNG4pffA_m",
"redirect_uris":
[
"http://localhost:8080/login/oauth2/code/google"
],
"javascript_origins":
[
"http://localhost:8080"
]
}
}