Add authentication guide for Keycloak
Jøran Bjerksetmyr
You have guides for some providers already at https://docs.expo.io/guides/authentication/#guides
Would love to see an example for Keycloak as well, the only big one lacking an example I feel.
Daniel
Has anyone been able to create a variant for Keycloak that can be shared here or for which a PR can be created for the docs?
Daniel
the following config worked out in my case:
const discovery = useAutoDiscovery('https://...KEYCLOAK.../realms/...REALM...');
const redirectUri = makeRedirectUri({
scheme: '...SCHEME...',
});
// Create and load an auth request
const [request, result, promptAsync] = useAuthRequest(
{
clientId: '...CLIENT_NAME...',
redirectUri,
scopes: ['openid', 'profile'],
},
discovery
);
Daniel
I have created a PR for this: https://github.com/expo/expo/pull/23226
AvTopo
Indeed!