Skip to content

Commit

Permalink
Merge pull request #606 from nttcom/topic/supabase-refresh
Browse files Browse the repository at this point in the history
refresh_access_token in supabase
  • Loading branch information
mshim03 authored Feb 28, 2025
2 parents 097c6cf + 303a3da commit 11c07cb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion api/app/auth/supabase_auth_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,13 @@ def login_for_access_token(self, username, password) -> Token:
)

def refresh_access_token(self, refresh_token) -> Token:
return Token(access_token="", token_type="bearer", refresh_token="")
session_data = self.supabase.auth.get_session()
session = session_data.model_dump()
return Token(
access_token=session.get("access_token"),
token_type="bearer",
refresh_token=session.get("refresh_token"),
)

def check_and_get_user_info(self, token):
super().check_token(token)
Expand Down

0 comments on commit 11c07cb

Please sign in to comment.