Force Authgear to Show Login Page
Force Authgear to always show login page even if the user have already logged in.
Last updated
Was this helpful?
Was this helpful?
import { PromptOption } from "@authgear/nextjs";
// via hook
const { signIn } = useAuthgear();
signIn({ prompt: PromptOption.Login });
// via component
<SignInButton signInOptions={{ prompt: PromptOption.Login }}>Sign In</SignInButton>authgear
.startAuthentication({
redirectURI: "<AUTHGEAR_REDIRECT_URI>",
prompt: PromptOption.Login,
})authgear
.authenticate({
redirectURI: 'com.reactnativeauth://host/path',
prompt: PromptOption.Login,
})AuthenticateOptions options = new AuthenticateOptions("<AUTHGEAR_REDIRECT_URI>");
List<PromptOption> promptOptions = Arrays.asList(PromptOption.LOGIN);
options.setPrompt(promptOptions);
mAuthgear.authenticate(options, new OnAuthenticateListener() {
@Override
public void onAuthenticated(@Nullable UserInfo userInfo) {
}
@Override
public void onAuthenticationFailed(@NonNull Throwable throwable) {
Log.d(TAG, throwable.toString());
}
});authgear?.authenticate(
redirectURI: "<AUTHGEAR_REDIRECT_URI>",
prompt: "login"
)_authgear.authenticate(
redirectURI: "<AUTHGEAR_REDIRECT_URI>",
prompt: "login",
);