Skip to content

Commit

Permalink
feat(auth): enable credentials on api and start-trial client
Browse files Browse the repository at this point in the history
closes #627
  • Loading branch information
ygrishajev committed Jan 16, 2025
1 parent f699cc1 commit 87049f3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion apps/api/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ const appHono = new Hono();
appHono.use(
"/*",
cors({
origin: env.CORS_WEBSITE_URLS?.split(",") || ["http://localhost:3000", "http://localhost:3001"]
origin: env.CORS_WEBSITE_URLS?.split(",") || ["http://localhost:3000", "http://localhost:3001"],
credentials: true
})
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export interface ApiWalletOutput {

export class ManagedWalletHttpService extends ApiHttpService {
async createWallet(userId: string) {
return this.addWalletEssentials(this.extractApiData(await this.post<ApiWalletOutput>("v1/start-trial", { data: { userId } })));
return this.addWalletEssentials(this.extractApiData(await this.post<ApiWalletOutput>("v1/start-trial", { data: { userId } }, { withCredentials: true })));
}

async getWallet(userId: string) {
Expand Down

0 comments on commit 87049f3

Please sign in to comment.