2.1.29 • Published 2 years ago

@jorsek/content-portal-auth v2.1.29

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago
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]"
    }
}
2.1.29

2 years ago

2.1.27

2 years ago

2.1.28

2 years ago

2.1.25

3 years ago

2.1.26

3 years ago

2.1.24

3 years ago

2.1.23

3 years ago

2.1.21

3 years ago

2.1.22

3 years ago

2.1.19

3 years ago

2.1.20

3 years ago

2.1.18

3 years ago

2.1.17

3 years ago

2.1.16

3 years ago

2.1.14

3 years ago

2.1.15

3 years ago

2.1.9

3 years ago

2.1.1

4 years ago

2.1.4

3 years ago

2.1.3

4 years ago

2.1.12

3 years ago

2.1.13

3 years ago

2.1.7

3 years ago

2.1.0

4 years ago

2.0.7

4 years ago

2.0.6

4 years ago

2.0.5

4 years ago

2.0.4

4 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.1.0

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago