Hosted Authentication
Register or log in a user using a Passage Hosted Login page
Passage Hosted Authentication handles user authentication by opening a browser tab for login or sign-up. This simplifies the process, allowing Passage to manage the authentication seamlessly when users need access to your application.
Prerequisites
Android and iOS platforms each have their own configuration steps required to provide Hosted Login to your users.
Authorize With Hosted Login
To register or log in a user using a Social Connection, simply call passage.hosted.authorize()
.
await passage.hosted.authorize();
// If successful, you will be able to get the current user:
const user = await passage.currentUser.userInfo();
Logout
The secure hosted web view will keep your auth session until it expires. To clear the web view auth session and remove user's tokens from device, use passage.currentUser.logout()
await passage.currentUser.logout();