OAuth2 Basic Connector is a generic OAuth plug-in designed to support any of the OAuth login functions.
For example: Google, GitHub, Facebook, Twitter, etc.
./answer build --with github.com/apache/answer-plugins/connector-basic
The following configuration items are in the plugin tab of the admin pag.
, e.g. user.email,user.ageYou need to configure the redirect URI in a third-party platform, such as google oauth, such as: https://example.com/answer/api/v1/connector/redirect/basic
The following list is not mentioned can be configured according to your actual situation, not required.
GitHub8cb9dxxxxxc24de99a3e055xxxxxxxxxxxxxxxxxxxxxxxxxxb78978bchttps://github.com/login/oauth/authorizehttps://github.com/login/oauth/access_tokenhttps://api.github.com/useridloginnameemailavatar_urlIn the https://github.com/settings/applications/new page, config the Authorization callback URL as https://example.com/answer/api/v1/connector/redirect/basic
Googlexxx.apps.googleusercontent.comGOCSPX-xxx-xxxxhttps://accounts.google.com/o/oauth2/authhttps://oauth2.googleapis.com/tokenhttps://www.googleapis.com/oauth2/v3/userinfosubnamenameemailpictureemail_verifiedhttps://www.googleapis.com/auth/userinfo.email,https://www.googleapis.com/auth/userinfo.profile,openidIn the https://console.developers.google.com/apis/credentials page, config the Authorized redirect URIs as https://example.com/answer/api/v1/connector/redirect/basic
Discord1126xxxNfmIMMcxxxhttps://discord.com/oauth2/authorizehttps://discord.com/api/oauth2/tokenhttps://discord.com/api/users/@meidusernameusernameemailavataremail,identifyIn the https://discord.com/developers/applications page, config the Redirects as https://example.com/answer/api/v1/connector/redirect/basic
Okta0oa666666UGqYGya5GJ4Ehttps://example.okta.com/oauth2/v1/authorizehttps://example.okta.com/oauth2/v1/tokenhttps://example.okta.com/oauth2/v1/userinfosubnameemailemailemail_verifiedopenid,email,groupsIn the Okta Application setup; config the Sign-in redirect URIs as https://example.com/answer/api/v1/connector/redirect/basic and the Initiate login URI as https://example.com/answer/api/v1/connector/login/basic In the Admin \ General in Answers ensure that the Site URL matches the page adddress as above (https://example.com/answer) or Okta will return a 4xx error.