GitHub user kerem-coemert added a comment to the discussion: Passing 
authenticated user into Superset iFrame with Keycloak

@dosu 

```typescript
keycloak = new Keycloak({
                        url: KEYCLOAK_CONFIG['auth-server-url'],
                        realm: KEYCLOAK_CONFIG.realm,
                        clientId: KEYCLOAK_CONFIG.resource
                })

                keycloak
                        .init({
                                onLoad: 'check-sso',
                                pkceMethod: 'S256',
                                checkLoginIframe: false
                        })
                        .then((authenticated) => {
                                isAuthenticated = authenticated
                                if (!authenticated) {
                                        // If not authenticated, redirect to 
Keycloak’s login page.
                                        keycloak.login()
                                } else {
                                        console.log('User authenticated via 
Keycloak.')
                                        // at this point I can call 
`jwt.verify()` on the token with the keycloak public key to get the decoded 
payload that has the user information.
```


GitHub link: 
https://github.com/apache/superset/discussions/33151#discussioncomment-12856447

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to