mirror of
https://github.com/logto-io/logto.git
synced 2025-01-06 20:40:08 -05:00
chore(console): update php and python guide (#4964)
This commit is contained in:
parent
15278302f3
commit
e49e92fb6f
2 changed files with 3 additions and 1 deletions
|
@ -147,7 +147,7 @@ To clean up the Python session and Logto session, we can designate a post sign-o
|
|||
And a sign-out route can be implemented as follows:
|
||||
|
||||
<pre>
|
||||
<code className="language-python">
|
||||
<code className="language-php">
|
||||
{`Route::get('/sign-out', function () {
|
||||
return redirect(
|
||||
// Redirect the user to the home page after a successful sign-out
|
||||
|
|
|
@ -199,6 +199,8 @@ Now, you can test your application:
|
|||
Now, you have a working sign-in flow, but your routes are still unprotected. Per the framework you use, you can create a decorator such as `@authenticated` to protect your routes. For example:
|
||||
|
||||
```python
|
||||
from functools import wraps
|
||||
|
||||
def authenticated(func):
|
||||
@wraps(func)
|
||||
async def wrapper(*args, **kwargs):
|
||||
|
|
Loading…
Reference in a new issue