mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-19 02:21:27 +02:00
fix lint
This commit is contained in:
parent
16cb8e753b
commit
e9caa4a217
46 changed files with 1784 additions and 728 deletions
|
|
@ -106,10 +106,6 @@ export function createAuthService(config: AuthServiceConfig) {
|
|||
*/
|
||||
async signUp(email: string, password: string): Promise<AuthResult> {
|
||||
try {
|
||||
const storage = getStorageAdapter();
|
||||
const deviceAdapter = getDeviceAdapter();
|
||||
const deviceInfo = await deviceAdapter.getDeviceInfo();
|
||||
|
||||
const response = await fetch(`${baseUrl}${endpoints.signUp}`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
|
|
@ -128,7 +124,8 @@ export function createAuthService(config: AuthServiceConfig) {
|
|||
return { success: false, error: errorData.message || 'Sign up failed' };
|
||||
}
|
||||
|
||||
const responseData = await response.json();
|
||||
// Consume response to avoid unhandled promise
|
||||
await response.json();
|
||||
|
||||
// Mana Core Auth returns user data immediately on registration
|
||||
// User needs to sign in separately to get tokens
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ export function decodeToken(token: string): DecodedToken | null {
|
|||
/**
|
||||
* Check if a token is valid locally (not expired)
|
||||
*/
|
||||
export function isTokenValidLocally(token: string, bufferSeconds: number = 10): boolean {
|
||||
export function isTokenValidLocally(token: string, bufferSeconds = 10): boolean {
|
||||
try {
|
||||
const payload = decodeToken(token);
|
||||
if (!payload || !payload.exp) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue