Auth Service - liammcmanu/Tagged GitHub Wiki

The AuthService class is responsible for handling authentication-related tasks. It contains the following methods:

getAuthToken Method

public static async getAuthToken(): Promise<string | void>

This method fetches the OAuth token. It returns a promise that resolves to the OAuth token or void.

revokeAuthToken Method

public static async revokeAuthToken(token: string): Promise<void>

This method revokes the provided OAuth token. It takes a token parameter of type string and returns a promise that resolves to void.

hasAuthenticated Method

public static async hasAuthenticated(): Promise<boolean>

This method checks if the user is authenticated. It returns a promise that resolves to a boolean value indicating whether the user is authenticated or not.

To use the AuthService class, follow these steps:

  1. Import the AuthService class from the appropriate file.
  2. Call the desired method on the AuthService class to perform the authentication-related task.

Please refer to the code and comments in the provided code snippet for more details on the implementation of each method.

⚠️ **GitHub.com Fallback** ⚠️