Misha999777 / auth-oidc

Small JS lib for OpenID Connect authentication.
MIT License
3 stars 0 forks source link

OIDC AuthService error: Auth failed: cant perform login redirect #4

Open danaabhi opened 4 weeks ago

danaabhi commented 4 weeks ago

I am using this plugin in my react + capacitor app, where i want to login when i click a button it open up everything but when redirect comes it shows error as

OIDC AuthService error: Auth failed: cant perform login redirect

I have attach image of keycloak Authentication flow, in which OIDC CIBA Grant is disable how can we use different flow

image

image

Misha999777 commented 1 week ago

Hello,

Recently there were changes made to how Electron/Capacitor redirects are handled: now you can specify arbitrary URLs to return a user to your application.

Here is an example:

authService.login('http://loclahost:3000/page')
authService.logout('http://loclahost:3000/page')

You can try it with the latest version auth-oidc@0.1.0

Also, the Standard flow in Keycloak should be enough to authenticate.