keycloak-scim/examples/cordova-native
dependabot[bot] 25d6a1008d
Bump semver in /examples/cordova-native (#23351)
Bumps  and [semver](https://github.com/npm/node-semver). These dependencies needed to be updated together.

Updates `semver` from 5.4.1 to 7.5.4
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v5.4.1...v7.5.4)

Updates `semver` from 7.3.8 to 7.5.4
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v5.4.1...v7.5.4)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-19 14:33:26 -04:00
..
www
.gitignore
config.xml
example-realm.json
package-lock.json Bump semver in /examples/cordova-native (#23351) 2023-09-19 14:33:26 -04:00
package.json
README.md

Basic Cordova Example

Before running this example you need to have Cordova installed with a phone or emulator available.

Start and configure Keycloak

Start Keycloak bound to an IP address available to the phone or emulator. For example:

bin/standalone.sh -b 192.168.0.10

Open the Keycloak admin console, click on Add Realm, click on 'Choose a JSON file', select example-realm.json and click Upload.

Navigate to applications, click on 'Cordova', select 'Installation' and in the 'Format option' drop-down select 'keycloak.json'. Download this file to the www folder.

Download '/js/keycloak.js' from the server to the www folder as well. For example:

wget http://192.168.0.10:8080/auth/js/keycloak.js

Install to Android phone or emulator

cordova platform add android
cordova run android

Once the application is opened you can log in with username: 'user', and password: 'password'.

Troubleshooting

  • You always need to initialize keycloak after the 'deviceready' event. Otherwise Cordova mode won't be enabled for keycloak.js.
  • 'http://localhost' should be listed in the allowed redirects in client configuration, but never 'file:///android_asset'.