Skip to content

Commit

Permalink
use supabase refreshSession to refresh session (#59)
Browse files Browse the repository at this point in the history
fix #58
  • Loading branch information
rphlmr authored Jan 2, 2023
1 parent bd100e0 commit e0c6a71
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions app/modules/auth/service.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ export async function refreshAccessToken(
): Promise<AuthSession | null> {
if (!refreshToken) return null;

const { data, error } = await getSupabaseAdmin().auth.setSession({
access_token: "",
const { data, error } = await getSupabaseAdmin().auth.refreshSession({
refresh_token: refreshToken,
});

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@remix-run/node": "*",
"@remix-run/react": "*",
"@remix-run/serve": "*",
"@supabase/supabase-js": "^2.1.0",
"@supabase/supabase-js": "^2.2.3",
"cookie": "^0.5.0",
"i18next": "^21.9.1",
"i18next-browser-languagedetector": "^6.1.5",
Expand Down

0 comments on commit e0c6a71

Please sign in to comment.