Skip to content
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
2 changes: 1 addition & 1 deletion nbs/explains/oauth.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Imagine a user (not logged in) comes to your AI image editing site, starts testing things out, and then realizes they need to sign in before they can click \"Run (Pro)\" on the edit they're working on. They click \"Sign in with Hugging Face\", log in, and are redirected back to your site. But now they've lost their in-progress edit and are left just looking at the homepage! This is an example of a case where you might want to keep track of some additional state. Another strong use case for being able to pass some uniqie state through the OAuth flow is to prevent something called a [CSRF attack](https://en.wikipedia.org/wiki/Cross-site_request_forgery). To add a state string to the OAuth flow, include a `state` argument when creating the login link:\n",
"Imagine a user (not logged in) comes to your AI image editing site, starts testing things out, and then realizes they need to sign in before they can click \"Run (Pro)\" on the edit they're working on. They click \"Sign in with Hugging Face\", log in, and are redirected back to your site. But now they've lost their in-progress edit and are left just looking at the homepage! This is an example of a case where you might want to keep track of some additional state. Another strong use case for being able to pass some unique state through the OAuth flow is to prevent something called a [CSRF attack](https://en.wikipedia.org/wiki/Cross-site_request_forgery). To add a state string to the OAuth flow, include a `state` argument when creating the login link:\n",
"\n",
"```python\n",
"# in login page:\n",
Expand Down