Overview

The Wepin login system uses three main tokens (OAuth Token, Firebase Token, and Wepin Session Token) for user authentication and session management. Each token is issued sequentially, allowing users to securely access the Wepin wallet service through this process.

Types of Tokens Used in Wepin

OAuth Token

The OAuth Token is issued by external social login providers (OAuth Providers) such as Google, Apple, Naver, and Discord. This token is provided in two forms: ID Token and Access Token. The ID Token is used to verify the user's identity, while the Access Token grants access to specific resources.

Token expiration times can vary depending on the OAuth Provider, and new tokens must be issued when they expire.

Firebase Token

The Firebase Token is issued by Firebase using the OAuth Token and is used for user authentication and session management within Wepin. The Firebase Token includes both an ID Token and a Refresh Token, which allow users to access the Wepin wallet service.

The ID Token from the Firebase Token expires 1 hour after issuance. The Refresh Token does not have a set expiration period but may expire if not used.

Wepin Session Token

The Wepin Session Token is ultimately issued by the Wepin server and is used to maintain the session with the Wepin wallet service. This token consists of an Access Token and a Refresh Token and plays a crucial role in maintaining the user's login session.

The Access Token expires 12 hours after issuance. The Refresh Token is valid for 7 days, during which a new Access Token can be issued.

Wepin Login Process

When implementing the login process for a wallet linked to your app, you can structure it as follows. The sequence below is an example where simplified login is applied.

  1. The user log in to the app using social login.

  2. An ID Token or Access Token is issued by the OAuth Provider.

  3. The issued token is used to access Wepin Firebase, where a Firebase Token is obtained.

  4. The Firebase Token is used to log in to Wepin.

  5. A Wepin Session Token is issued to maintain the session and is used to authenticate various requests.

Explore various information related to Wepin login.

Last updated