Skip to content

Commit

Permalink
docs: Make ensure_fresh_token more clear.
Browse files Browse the repository at this point in the history
  • Loading branch information
mturoci committed Sep 23, 2022
1 parent 08afda6 commit f0acf0c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion website/docs/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ from h2o_wave import Q, main, app
@app('/example')
async def serve(q: Q):
# Refreshes the token and makes it available in q.auth.access_token.
new_access_token = q.auth.ensure_fresh_token()
# Note that if refresh is not necessary, q.auth.access_token stays the same and None is returned.
new_access_token = await q.auth.ensure_fresh_token()
```
## App Server API Access Keys
Expand Down

0 comments on commit f0acf0c

Please sign in to comment.