auth-vir 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -65,7 +65,7 @@ Use this on your host / server / backend to authenticate client / frontend reque
|
|
|
65
65
|
5. In your application code, load the string keys from step 1 into [`parseJwtKeys`](https://electrovir.github.io/auth-vir/functions/parseUserJwt.html): `await parseJwtKeys(stringKeys)`.
|
|
66
66
|
6. Use the output of [`parseJwtKeys`](https://electrovir.github.io/auth-vir/functions/parseUserJwt.html) in all auth functionality:
|
|
67
67
|
- [`generateSuccessfulLoginHeaders`](https://electrovir.github.io/auth-vir/functions/generateSuccessfulLoginHeaders.html): after a user successfully logs in, run this function and attach the output headers to the `Response` object.
|
|
68
|
-
- [`extractUserIdFromRequestHeaders`](https://electrovir.github.io/auth-vir/functions/extractUserIdFromRequestHeaders.html): to verify an authenticated user `Request` object (make sure to properly attach all auth in the client by following the below [Client side](#client-side) guide).
|
|
68
|
+
- [`extractUserIdFromRequestHeaders`](https://electrovir.github.io/auth-vir/functions/extractUserIdFromRequestHeaders.html): to verify an authenticated user `Request` object (make sure to properly attach all auth in the client by following the below [Client / frontend side](#client--frontend-side) guide).
|
|
69
69
|
|
|
70
70
|
Here's a full example of how to use all host / server / backend side auth functionality:
|
|
71
71
|
|
|
@@ -236,7 +236,7 @@ Use this on your client / frontend for storing and sending session authorization
|
|
|
236
236
|
1. Send a login fetch request to your host / server / backend with `{credentials: 'include'}` set on the request.
|
|
237
237
|
2. Pass the `Response` from step 1 into [`handleAuthResponse`](https://electrovir.github.io/auth-vir/functions/handleAuthResponse.html).
|
|
238
238
|
3. In all subsequent fetch requests to the host / server / backend, set `{credentials: 'include'}` and include `{headers: {[csrfTokenHeaderName]: getCurrentCsrfToken()}}`.
|
|
239
|
-
4. Upon user logout, call [`wipeCurrentCsrfToken()]
|
|
239
|
+
4. Upon user logout, call [`wipeCurrentCsrfToken()`](https://electrovir.github.io/auth-vir/functions/wipeCurrentCsrfToken.html)
|
|
240
240
|
|
|
241
241
|
Here's a full example of how to use all the client / frontend side auth functionality:
|
|
242
242
|
|