Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesedmonston committed Nov 4, 2020
1 parent fa2a2bb commit fc39c23
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ Now you've got your schema set up, you'll need to set how long you'd like your t

If requests are made with an expired token, responses will `throw` with `Invalid Authorization Header`.

### HTTP-Only Cookie

Here you can choose wether or not the `authenticate` and `register` mutations should set an HTTP-Only cookie (named `gql_accessToken`) which will be used for signing subsequent requests automatically. Doing this prevents the token being accessible through JavaScript.

Tokens can still be retrieved from the response of these mutations, for use in native apps – where cookies aren't available.

### User Group

If users will also have access to the Craft control panel, you can choose which user group they will be assigned to at registration time.
Expand Down
Binary file modified assets/plugin-settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/templates/index.twig
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
}) }}

{{ forms.field({
label: 'Use HTTP-Only cookie',
label: 'Use HTTP-Only Cookie',
instructions: "Whether or not the `authenticate` and `register` mutations should set an HTTP-Only cookie (named `gql_accessToken`) which will be used for signing subsequent requests automatically.",
warning: "If users will be authenticating from a remote origin, you will need to add that origin to the `allowedGraphqlOrigins` config setting in `general.php`. Note that Firefox and Safari may still deem this as a 'cross-site tracking cookie' and block it.",
name: 'setCookie',
Expand Down

0 comments on commit fc39c23

Please sign in to comment.