Merge pull request #2628 from ilanddev/master
KEYCLOAK-2821 Add adapter option
This commit is contained in:
commit
2d9bb402fc
1 changed files with 10 additions and 5 deletions
|
@ -34,13 +34,18 @@
|
||||||
|
|
||||||
kc.init = function (initOptions) {
|
kc.init = function (initOptions) {
|
||||||
kc.authenticated = false;
|
kc.authenticated = false;
|
||||||
|
if (initOptions && initOptions.adapter === 'cordova') {
|
||||||
if (window.Cordova) {
|
adapter = loadAdapter('cordova');
|
||||||
adapter = loadAdapter('cordova');
|
} else if (initOptions && initOptions.adapter === 'default') {
|
||||||
} else {
|
|
||||||
adapter = loadAdapter();
|
adapter = loadAdapter();
|
||||||
|
} else {
|
||||||
|
if (window.Cordova) {
|
||||||
|
adapter = loadAdapter('cordova');
|
||||||
|
} else {
|
||||||
|
adapter = loadAdapter();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (initOptions) {
|
if (initOptions) {
|
||||||
if (typeof initOptions.checkLoginIframe !== 'undefined') {
|
if (typeof initOptions.checkLoginIframe !== 'undefined') {
|
||||||
loginIframe.enable = initOptions.checkLoginIframe;
|
loginIframe.enable = initOptions.checkLoginIframe;
|
||||||
|
|
Loading…
Reference in a new issue