Auth0 Home Blog Docs

How can I force to display different tab on Lock widget in the universal login page with Android?

#1

I have an Android app and using the Auth0.Android SDK. I would like the mobile app to be able to provide preferred Lock tab dynamically based on the app flow, i.e. in case user registers (based on our business logic flow) we redirect to the Sign Up tab, otherwise to the “Log In” one.

#2

You could pass custom parameters to the universal page with withParameters attribute in the Android SDK. Once this is implemented like below, you should be able to get the requested value in the config.extraParams.mode in the hosted login page.

    Map<String, Object> parameters = Collections.singletonMap("mode", (Object) "signUp");
    WebAuthProvider.init(account)
            .withParameters(parameters)
            .start(activity, callback);

Then you could use the passed custom parameter to change the initialScreen attribute. This QA can be useful for the last part while configuring the hosted login page.

1 Like
closed #3

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.