can not send any request to laravel with axios nuxt if i am not logged in with nuxt auth, i use laravel sanctum, nuxt auth, nuxt axios #1515
Unanswered
zaidpro
asked this question in
Support Requests
Replies: 3 comments
-
that is my problem to anyone have solution for this problem |
Beta Was this translation helpful? Give feedback.
0 replies
-
and in my url after hit enter it will be -> http://localhost:3000/register?userName=Zaid%20Proo&email=test%40test&password=password, and request will be canceled, like image above, |
Beta Was this translation helpful? Give feedback.
0 replies
-
Im getting the same error, client cancelling XHR request, server not receiving the request. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
it given try to register
session.php
cors.php
sanctum.php
.env
api.php
nuxt.config.js
register.vue
register form
export default {
data() {
return {
form: {
name: "yes",
email: "[email protected]",
password: "password",
},
};
},
// mounted() { /// this work when mounted
//this.$axios.$get("sanctum/csrf-cookie");
// },
methods: {
GoToLogin() {
this.$router.replace({ path: "/login" });
},
async submitt() {
try {
await this.$axios.$get("sanctum/csrf-cookie");
const result = await this.$axios.$post("/api/register", this.form);
} catch (error) { }
},
},
};
</script>
when press submit
Beta Was this translation helpful? Give feedback.
All reactions