New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[KEYCLOAK-6655] Javascript Adapter - Allow users to provide cordova-specific options to login and register #4998
Conversation
…-app-browser) to the login and register functions
…-app-browser) to the login and register functions
Looks good to me. Could you also update the documentation: @mhajas could you take a look as well? Perhaps you could also try it out? We don't have any Cordova tests yet right? So we can't really add any tests here. |
@mhajas bump |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR looks good. I tried it on app in examples with my android mobile device and it works pretty good :-) @stianst after removing the empty line, this is good to go for me
@@ -1218,7 +1242,7 @@ | |||
|
|||
logout: function(options) { | |||
var promise = createPromise(); | |||
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this empty line
@@ -1253,7 +1277,8 @@ | |||
|
|||
register : function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a notion: It is not possible to add app-specific options for registration. Probably because registration is mostly invoked from the login page and not from some application page. Maybe it is possible to somehow get around this for example with some global options specified by a creator of the app. @looorent and @stianst what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the options to register function for the Cordova moda is missing for some reason. It does have it for the default mode. Not sure why, but sure that's not correct. I don't think it's in the scope of this PR though as it's already missing in master.
@@ -1253,7 +1277,8 @@ | |||
|
|||
register : function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the options to register function for the Cordova moda is missing for some reason. It does have it for the default mode. Not sure why, but sure that's not correct. I don't think it's in the scope of this PR though as it's already missing in master.
…pecific options to login and register (keycloak#4998) * 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.
@stianst Sorry for the delay but here are two pull requests: |
@looorent great thanks, both merged |
In
keycloak-js
(version 3.4.3),login
andregister
functions do not allow to pass cordova-specific options to the in-app-browser.This PR proposes an additional
cordovaOptions
key (to theoptions
parameter).cordovaOptions
is an object where is key/value is passed to the in-app-browser.For example, this parameter disables the in-app-browser's zoom capability on Android:
hidden
andlocation
options are not affected by this new parameter.Available options are defined at https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-inappbrowser/