goth
social auth library, modified slightly to work with a multi-tenant structure. The social provider should provide seamless integration with:
http://tib-hostname:TIB-PORT/auth/{PROFILE-ID}/gplus/callback
{listen_path}/toauth/authorize
), so we will need to know the listen path and ID of this API so TIB can make the correct API calls on your behalf.
APIListenPath
: This is the listen path of your API, TIB uses this to generate the OAuth token.BaseAPIID
: The base API ID for the listen path mentioned earlier, this forms the basic access grant for the token (this will be superseded by the MatchedPolicyID
, but is required for token generation).ClientId
: The client ID for this profile within Tyk Gateway.Secret
: The client secret for this profile in Tyk Gateway.RedirectURI
: The Redirect URL set for this profile in the Tyk Gateway.ResponseType
: This can be token
or authorization_code
, the first will generate a token directly, the second will generate an auth code for follow up access. For SPWA and Mobile Apps it is recommended to just use token
.Domain
constraint ensures that only users from yourdomain.com
domain-based email accounts are allowed to login.
Replace it with correct domain or remove this section if you don’t want to set this constraint.
When TIB successfully authorizes the user, and generates the token using the relevant OAuth credentials, it will redirect the user to the relevant redirect with their token or auth code as a fragment in the URL for the app to decode and use as needed.
There is a simplified flow, which does not require a corresponding OAuth client in Tyk Gateway, and can just generate a standard token with the same flow.