Skip to content

Instantly share code, notes, and snippets.

@Nilanth

Nilanth/csrf.jsx Secret

Created March 15, 2022 17:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nilanth/204a989d470162044baf572dbf5588bb to your computer and use it in GitHub Desktop.
Save Nilanth/204a989d470162044baf572dbf5588bb to your computer and use it in GitHub Desktop.
import axios from 'lib/axios'
export const useAuth = () => {
const csrf = () => axios.get('/sanctum/csrf-cookie');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment