Skip to content

Commit

Permalink
Merge pull request #121 from mousavian/master
Browse files Browse the repository at this point in the history
Provide an example of how to use generate_csrf_token in config
  • Loading branch information
trenpixster committed Mar 2, 2017
2 parents b5d8d23 + 38ab102 commit 5ae9622
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion configs.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,15 @@ config :addict,

# CSRF Token

If you're using CSRF token generation, use the `generate_csrf_token` configuration value to pass the function responsible for it.
If you're using CSRF token generation, use the `generate_csrf_token` configuration value to pass the function responsible for it. For instance on your configuration file:

```elixir
# config.exs

config :addict,
(...),
generate_csrf_token: (fn -> Phoenix.Controller.get_csrf_token end)
```

# Not Logged in Redirect

Expand Down

0 comments on commit 5ae9622

Please sign in to comment.