Skip to content

Commit

Permalink
fix: Unknown encoding: base64url (#30)
Browse files Browse the repository at this point in the history
* fix: Unknown encoding: base64url

* chore: update Changelog
  • Loading branch information
thorwebdev authored Feb 23, 2022
1 parent e880820 commit 4a980a2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## 1.1.3 - 2022-02-23

- [#30](https://github.com/supabase-community/supabase-auth-helpers/pull/30): fix: Unknown encoding: base64url.

## 1.1.2 - 2022-02-22

- Makes `withAuthRequired` work for API routes as well. See [the docs](./src/nextjs/README.md#protecting-api-routes) for more details.
Expand Down
2 changes: 1 addition & 1 deletion src/shared/utils/jwt.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export const jwtDecoder = (jwt: string) =>
JSON.parse(Buffer.from(jwt.split('.')[1], 'base64url').toString());
JSON.parse(Buffer.from(jwt.split('.')[1], 'base64').toString('utf8'));

0 comments on commit 4a980a2

Please sign in to comment.