KEYCLOAK-2606: add links to the example cordova apps
This commit is contained in:
parent
bf29410b6b
commit
044afd3e62
1 changed files with 9 additions and 2 deletions
|
@ -176,12 +176,14 @@ There are security concerns to consider, before using this mode:
|
|||
It is possible for the app to gain access to the credentials of the user, as it has full control of the browser rendering the login page.
|
||||
So do not allow its use in apps you dont trust.
|
||||
|
||||
We have an example app that can help you get started: https://github.com/keycloak/keycloak/tree/master/examples/cordova
|
||||
|
||||
The alternative mode `cordova-native` takes a different approach.
|
||||
It opens the login page in the systems browser.
|
||||
After the user has authenticated, the browser redirects back into the app by a special URL.
|
||||
From there, the keycloak adapter can finish the login by reading the code or token from the URL.
|
||||
|
||||
You can activate the native mode by passing the adater type `cordova-native` to the ìnit` method:
|
||||
You can activate the native mode by passing the adater type `cordova-native` to the `init` method:
|
||||
|
||||
[source,javascript]
|
||||
----
|
||||
|
@ -196,7 +198,10 @@ This adapter required two additional plugins:
|
|||
The technical details for linking to an app differ on each plattform and special setup is needed.
|
||||
Please refer to the according sections of the deeplinks plugin for further instructions (https://github.com/e-imaxina/cordova-plugin-deeplinks#android-web-integration[Android] and [iOS https://github.com/e-imaxina/cordova-plugin-deeplinks#ios-web-integration[iOS]].
|
||||
|
||||
There are different kinds of links for opening apps: custom schemes (i.e. `myapp://login` or `android-app://com.example.myapp/https/example.com/login`) and https://developer.apple.com/ios/universal-links/[Universal Links (iOS]) / https://developer.android.com/training/app-indexing/deep-linking.html[Deep Links (Android)]. While the former are easier to setup and tend to work more reliable, the later offer extra security as they are unique and only the owner of a domain can register them. Custom-URLs are deprecated on iOS. We recommend that you use universal links, combined with a fallback site with a custom-url link on it for best reliability.
|
||||
There are different kinds of links for opening apps: custom schemes (i.e. `myapp://login` or `android-app://com.example.myapp/https/example.com/login`) and https://developer.apple.com/ios/universal-links/[Universal Links (iOS]) / https://developer.android.com/training/app-indexing/deep-linking.html[Deep Links (Android)].
|
||||
While the former are easier to setup and tend to work more reliable, the later offer extra security as they are unique and only the owner of a domain can register them.
|
||||
Custom-URLs are deprecated on iOS.
|
||||
We recommend that you use universal links, combined with a fallback site with a custom-url link on it for best reliability.
|
||||
|
||||
Furthermore, we recommend the following steps to improve compatibility with the Keycloak Adapter:
|
||||
|
||||
|
@ -207,6 +212,8 @@ Furthermore, we recommend the following steps to improve compatibility with the
|
|||
<preference name="AndroidLaunchMode" value="singleTask" />
|
||||
----
|
||||
|
||||
There is an example app that shows how to use the native-mode: https://github.com/keycloak/keycloak/tree/master/examples/cordova-native
|
||||
|
||||
==== Earlier Browsers
|
||||
|
||||
The JavaScript adapter depends on Base64 (window.btoa and window.atob) and HTML5 History API.
|
||||
|
|
Loading…
Reference in a new issue