KEYCLOAK-2606 Added cordova native
KEYCLOAK-2606 Some more fixes and tweaks
Fix redirect in example realm
feature(cordova-native): fix universalLinks and kc options
Added 'cordova-native' to typings
Added an option to define a "default" redirectUri in keycloak.js
Added 'login' and 'logout' event to universalLinks configuration in config.xml
Improved 'cordova-native' example to always use a redirectUri and
update state after successfull logout
Setting the 'authenticated' flag for the keycloak instance to 'false'
after a logout redirect
KEYCLOAK-2606: Simplify example for cordova-native
I wanted to make it explicit which options are actually needed, so I didn't want to reuse the keycloak conf
KEYCLOAK-2606: simplify example
The update state after logout shouldn't be necessary as it is set in `keycloak.onAuthLogout = updateState;`
Not sure why it is called after the login promise...
Fixes
* Javascript Adapter - Allow users to pass cordova-specific options (in-app-browser) to the login and register functions
* Javascript Adapter - Allow users to pass cordova-specific options (in-app-browser) to the login and register functions
* [KEYCLOAK-6655] On Android 8, explicit hidden=no fails on in-app-browser load.
* Make the `keycloak.js` capable of working with alternate OIDC providers
(provided that they create access_tokens as JWT tokens with `exp` and
`iat` claims).
Also add a `useNonce` option, to allow disabling the `nonce` check
since, in the OIDC specification, `nonce` is optional.
Signed-off-by: David Festal <dfestal@redhat.com>
* Update the `keycloak.ts` with the `useNonce` additional init option.
Signed-off-by: David Festal <dfestal@redhat.com>
* Fix 2 errors in the case `checkSessionIframe` is used
Signed-off-by: David Festal <dfestal@redhat.com>
In the current implementation a message coming from any window on the same origin may cause the refresh token to be cleared.
In my case, messages generated by a chrome extension were causing the application to logout unexpectedly. With additional condition only messages coming from the login iFrame will be processed. Another suggestion would be changing the condition `event.data != "unchanged"` to something more specific.
You just can add an 'adapter' option to the kc.init() function like :
kc.init({adapter: "default | cordova"});
This will allow the users to choose the adapter they want. They can force the use of the default adapter even if they are using cordova or use the cordova adapter even if they are using a regular desktop.
If you omit this parameter, it just fallback to the old way. So, if you are under cordova it will run the cordova adapter and if you are under a desktop, it will load the default adapter instead.
Hope this can help.