| title | Authentication Overview in MPC Core Kit iOS SDK |
|---|---|
| sidebar_label | Overview |
| description | Web3Auth MPC Core Kit iOS SDK - Authentication Overview | Documentation - Web3Auth |
import TabItem from "@theme/TabItem"; import Tabs from "@theme/Tabs";
There are two ways to login your users, depending on the type of authentication method you've
chosen. If you are looking for an Authentication Flow in your application like
Single Page Application(SPA) flow, you can
use the loginWithOAuth method.
If you are looking to pass a JWT-based IdToken to the SDK from your application, like
Regular Web Application(RWA) Flow or even
using your own JWT provider, you can use the loginWithJWT method.
As a prerequisite, before triggering the login function, you need to create a verifier for your login method on the Web3Auth Dashboard.
Since this is a Core Kit SDK, it gives you flexibility to use your own authentication service. You need to create a custom verifier, which allows you to plug in your own authentication service to authenticate users.
For example, while authenticating with Google, you have to use your own Google Client ID setup to authenticate users directly or use auth provider services like Auth0, Firebase, AWS Cognito etc. Additionally, you can make your own JWT token authentication system and pass over the ID Token to Web3Auth.
Learn how to create a verifier.
As discussed earlier, there are two login methods available in the SDK tailored to your use case.
-
Login with OAuth: You can use this method the implicit login flow, where you don't need to manually handle the authentication and get the JWT token.
-
Login with JWT: You can use this method to manually handle the authentication, and send the JWT token to Web3Auth. This method allows you to bring your own authentication flow.
:::tip Recommended
For faster login speeds, we recommend using the Login with JWT method.
:::
