Skip to content

Commit

Permalink
Fix jwt.encode because tokens are returned as string instead of a b…
Browse files Browse the repository at this point in the history
…yte string
  • Loading branch information
kemar committed Mar 25, 2021
1 parent 478dc84 commit 8dd060a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion itou/utils/apis/metabase.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# * https://github.com/jpadilla/pyjwt
# * https://github.com/metabase/embedding-reference-apps/blob/master/django/embedded_analytics/user_stats/views.py
def _get_token(payload):
return jwt.encode(payload, settings.METABASE_SECRET_KEY, algorithm="HS256").decode("utf8")
return jwt.encode(payload, settings.METABASE_SECRET_KEY, algorithm="HS256")


def metabase_embedded_url(dashboard_id):
Expand Down

0 comments on commit 8dd060a

Please sign in to comment.