Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions gotrue/helpers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations

from base64 import b64decode
from base64 import urlsafe_b64decode
from json import loads
from typing import Any, Dict, Type, TypeVar, Union, cast

Expand Down Expand Up @@ -123,4 +123,4 @@ def decode_jwt_payload(token: str) -> Any:
# Addding padding otherwise the following error happens:
# binascii.Error: Incorrect padding
base64UrlWithPadding = base64Url + "=" * (-len(base64Url) % 4)
return loads(b64decode(base64UrlWithPadding).decode("utf-8"))
return loads(urlsafe_b64decode(base64UrlWithPadding).decode("utf-8"))