i have been looking around while now, can't find solution fits needs or example can me on way...
tl;dr
how can make use of devise + redis without needing user table & object, instead store user/session related data (obtained api-call e.g. email, access_token, refresh_token, admin_boolean) in redis length of session?
the problem
i have api (rails + doorkeeper + grape) used rails client. following concept of eating own dog food client makes calls api obtain relevant info, data etc. , show or (process if necessary, done in api) in client.
since client totally depends on api not have tables on client side, except 1 user table, want rid of.
this user table exists because make use of devise allow (new) users register , log in client app. few modifications in session_controller, have been able send registration data api, data saved. when user logs in call made api/doorkeeper using oauth2 gem obtain access_token + refresh_token (+ email + admin_boolean) can used sending further requests.
currently data saved attributes part of user object used throughout application, ie every time user logs in call user.new(data_params).
however rather rid of approach , instead save data in redis, allowing me drop user table , client db...
my problem not don't know how save values in redis, rather can't figure out how use devise without user table, since devise/warden requires resource object.
so question is: know how can tackle problem? possible limitations of approach? (i don't need functionality of relational db)
please let me know if unclear (it has been long day ;-) of suggestions in advance!
Comments
Post a Comment