@jorsek/content-portal-auth
v2.1.29
Published
```js const config = { "authRequired": false, "authStrategy": { "idp": "google", "client_id": "{CLIENT_ID}", "client_secret": "{CLIENT_SECRET}", "aud": "{IDP_AUDIENCE}", "iss": "{IDP_ISSUER}", "grant
Downloads
42
Maintainers
Keywords
Readme
const config = {
"authRequired": false,
"authStrategy": {
"idp": "google",
"client_id": "{CLIENT_ID}",
"client_secret": "{CLIENT_SECRET}",
"aud": "{IDP_AUDIENCE}",
"iss": "{IDP_ISSUER}",
"grant_type": "authorization_code",
"response_type": "code",
"scope": "https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email",
"hd": ["jorsek.com"],
// "jwt_key": "jwt",
"redirect_path": "/auth/google",
"auth_success_redirect": "/?state=${state}",
"auth_uri": "https://accounts.google.com/o/oauth2/auth?redirect_uri=${base_uri}${redirect_path}&client_id=${client_id}&response_type=${response_type}&scope=${scope}&state=${state}",
"steps": [
{
//name REQUIRED; result data is available to subsequent steps using this key
"name": "token",
//uri REQUIRED
"uri": "https://oauth2.googleapis.com/token?code=${auth.code}&client_id=${client_id}&client_secret=${client_secret}&redirect_uri=${base_uri}${redirect_path}&grant_type=${grant_type}&state=${state}",
//method OPTIONAL; default = "get"
"method": "POST",
//params OPTIONAL; default = {}
// "params": {},
//config OPTIONAL; default = {}
"config": {
'headers': {
'Content-Type': 'application/x-www-form-urlencoded'
}
},
//map OPTIONAL; default = null
// "map": {
// "id_type": "typ",
// "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress": "email",
// "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/expiration": "exp"
// }
},
{
//name REQUIRED; result data is available to subsequent steps using this key,
//If the step name is "jwt" we will automatically validate it.
"name": "jwt",
//uri REQUIRED
"uri": "https://www.googleapis.com/oauth2/v3/tokeninfo?id_token=${token.id_token}",
//method OPTIONAL; default = "get"
// "method": "GET",
// "params": {},
// "config": {},
// "map": {
// "id_type": "typ",
// "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress": "email",
// "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/expiration": "exp"
// }
}
],
"authSigningKey": "[GET FROM EASYDITA]"
}
}