You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1811120
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/_client/authorization.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -225,7 +225,9 @@ The storage must also respond to `save_pending_authorization(state, pending)`, `
225
225
`Provider.new` raises `Provider::PendingAuthorizationStorageError` when it does not. A pending authorization is a Hash of JSON-compatible values that includes
226
226
the PKCE verifier, so keep it where you keep credentials, persist it as-is, and share it between the processes that can receive the redirect.
227
227
`delete_pending_authorization` must remove the entry and return it in one atomic step, such as `GETDEL` in Redis or `DELETE ... RETURNING` in SQL,
228
-
and return `nil` when there was none. `InMemoryStorage` implements the methods for a single process.
228
+
and return `nil` when there was none. `finish!` touches only the entry its callback's `state` names, and an authorization the user never finishes gets no callback,
229
+
so the storage should expire entries older than `pending_authorization_max_age`, with a TTL in Redis or a periodic delete in SQL.
230
+
`InMemoryStorage` implements the methods for a single process and drops such entries the next time a pending authorization is saved.
229
231
230
232
`finish!` redeems the code the way the authorization began, and refuses anything else with `Flow::AuthorizationError`:
0 commit comments