From 867f7e105f3f662da922d4952eef7a8c1c5733a0 Mon Sep 17 00:00:00 2001 From: Elie Rotenberg Date: Fri, 7 Jun 2024 16:28:02 +0200 Subject: [PATCH] feat: make profileUrl accessToken optional in SDK (#63) * chore: make profileUrl accessToken optional in SDK * Propagates changes from #62 * fix: extra `}` at the end of getSignUpUrl * Similar to 62 --- src/sdk.ts | 4 ++-- src/url.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sdk.ts b/src/sdk.ts index 2fdf088..8b19378 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -640,11 +640,11 @@ export class SDK { return this.urlSDK.getSignInUrl(redirectUri) } - public getUserProfileUrl(userName: string, accessToken: string) { + public getUserProfileUrl(userName: string, accessToken?: string) { return this.urlSDK.getUserProfileUrl(userName, accessToken) } - public getMyProfileUrl(accessToken: string) { + public getMyProfileUrl(accessToken?: string) { return this.urlSDK.getMyProfileUrl(accessToken) } } diff --git a/src/url.ts b/src/url.ts index 97dc811..af8368b 100644 --- a/src/url.ts +++ b/src/url.ts @@ -35,7 +35,7 @@ export class UrlSDK { public getSignUpUrl(enablePassword: boolean, redirectUri: string): string { if (enablePassword) { - return `${this.config.endpoint}/signup/${this.config.appName}}` + return `${this.config.endpoint}/signup/${this.config.appName}` } else { return this.getSignUrl('signup', redirectUri) }