如何在Android中添加关闭标记到Auth0锁定登录屏幕
问题描述:
我正在将Auth0集成到我的Android应用程序中,并且需要允许用户跳过/关闭Auth0登录屏幕。但是,我无法显示关闭按钮。如何在Android中添加关闭标记到Auth0锁定登录屏幕
仅供参考我添加了一个截图,显示了我需要在我的应用程序中显示的关闭按钮。
这是我的代码:
Auth0 auth0 = new Auth0(
getString(R.string.auth0_client_id), getString(R.string.auth0_domain));
mLock = Lock.newBuilder(auth0, mCallback)
//Add parameters to the builder
.closable(true)// ITS NOT WORKING
.build(this);
broadcastManager = LocalBroadcastManager.getInstance(this);
broadcastManager.registerReceiver(receiver,
new IntentFilter("com.auth0.android.lock.action.Authentication"));
答
的closable(true)
在锁定为Android可用选项不会触发关闭按钮上的UI外观。
按照related GitHub issue的说明,这是有意设计的,使其可关闭只是让用户以标准的Android方式返回。