waiting-for-dev / devise-jwt

JWT token authentication with devise and rails

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Devise Resource not Authenticated

ror-vs opened this issue · comments

I am using devise-jwt gem for token-based authentication for multiple resources. The problem that I am facing is that, even without providing the emails and password for the resource, the resource is logged in without authenticating.

Expected behavior

the resource should be authenticated before login

Actual behavior

the resource is logged in without authentication

In devise.rb initializer I have
image

in my routes i have

image
image
image

My session controllers for the resources are as follows:

image
image

Here is a snap from the login api where password is not provided but it has logged in th client

image

is there a way we can create the custom token for the resources which are not being created from devise?
my test case is I am decoding the info from google token and then saving it backend. is it possible to create a token for it?

No, this is an extension for Devise. Probably you'll need to manually do something with https://github.com/jwt/ruby-jwt