Skip to content

Commit

Permalink
docs(auth): typo manging to managing (adonisjs#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
mastermunj committed May 20, 2021
1 parent 5c03ead commit 4d727aa
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions content/guides/auth/api-tokens-guard.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
summary: Authenticate requests using Opaque access tokens
---

The API guard uses the database backend **opaque access token** to authenticate the user requests.
The API guard uses the database backend **opaque access token** to authenticate the user requests.

You must use this guard to implement stateless authentication, meaning no state is stored inside cookies or sessions by the AdonisJS application. Also, with stateless authentication, it is the responsibility of the client to keep the tokens secure.

Expand Down Expand Up @@ -33,7 +33,7 @@ Configuration for tokens is managed inside the `config/auth.ts` file under the g
```

#### type
The type property holds the type of the token you are generating. Make sure to give it a unique name when you have multiple API token guards in use.
The type property holds the type of the token you are generating. Make sure to give it a unique name when you have multiple API token guards in use.

The unique name ensures that two guards generating the token for the same user does not have overlap or any conflicts.

Expand Down Expand Up @@ -78,7 +78,7 @@ Configuration for tokens is managed inside the `config/auth.ts` file under the g
```

#### type
The type property holds the type of the token you are generating. Make sure to give it a unique name when you have multiple API token guards in use.
The type property holds the type of the token you are generating. Make sure to give it a unique name when you have multiple API token guards in use.

The unique name ensures that two guards generating the token for the same user does not have overlap or any conflicts.

Expand Down Expand Up @@ -119,7 +119,7 @@ Route.post('login', async ({ auth, request, response }) => {
// highlight-end
} catch {
return response.badRequest('Invalid credentials')
}
}
})
```

Expand Down Expand Up @@ -165,7 +165,7 @@ Route.post('login', async ({ auth, request, response }) => {

---

### Manging tokens expiry
### Managing tokens expiry
You can also define the expiry for the token at the time of the generating it.

```ts
Expand Down

0 comments on commit 4d727aa

Please sign in to comment.