Laravel auth api not working

When I try to verify my token generated at login page it is giving me error and not passing through login page after successful authentication.

Request URL: https://preview.keenthemes.com/metronic8/laravel/api/verify_token
Request Method: POST
Status Code: 422 Unprocessable Content
Remote Address: 178.62.61.16:443
Referrer Policy: strict-origin-when-cross-origin

Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (7)

Hi Akshaya,

Are you working on the Laravel framework?
May I know, what are you doing with this URL api/verify_token?

Thanks

Deleted comment

I have purchased and downloaded the theme and it had login page, on react, so while i tried to login
2 days back login api wasn't working, it was passing, null value in "api_token" variable.
now today when I checked the login api (https://preview.keenthemes.com/metronic8/laravel/api/login
), it worked and created "api_token" but now it is not verifying the token in the above link provided.

Hi Akshaya!

May I know which version of Metronic are you using?

We had some problems with our API in Metronic versions < v3.0.30, could you please try API in the latest Metronic version?

Thank you!

I am using metronic version of 8.0.35.
Still there is an issue with "verify_token" api.

Are you using our app/modules/auth/redux/AuthCRUD.ts to trigger api/verify_token endpoint?

As you can see on our preview page authentication works fine:
https://preview.keenthemes.com/metronic8/react/demo1/dashboard

I have purchased and downloaded the theme and it had login page, on react, so while i tried to login
2 days back login api wasn't working, it was passing, null value in "api_token" variable.
now today when I checked the login api (https://preview.keenthemes.com/metronic8/laravel/api/login
), it worked and created "api_token" but now it is not verifying the token in the above link provided.

We are using laravel 9 with sanctum for api . For frontend using React metronic theme.

login api working proper but after verify_token function call its not defined becasue of login and register not need verify_token. so please tell us how can I manage this metronic theme.

Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(