Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manual Authentication and Registration #1051

Closed
NicholasLYang opened this issue Dec 26, 2017 · 3 comments
Closed

Manual Authentication and Registration #1051

NicholasLYang opened this issue Dec 26, 2017 · 3 comments

Comments

@NicholasLYang
Copy link

Hi, so I'm attempting to integrate devise_token_auth and graphql_ruby. Namely, I want authentication for some of my mutations. However, I'm struggling with finding a way to manually create users and authenticate them without going through the usual request routes. Is there a helper function or something for creating users? Thanks!

@zachfeldman
Copy link
Contributor

Hey @NicholasLYang how about User.create(user_params)? Not sure why you need to use a special DTA method to create a user. There is a special DTA method for auth though! See valid_token in the docs:
https://github.com/lynndylanhurley/devise_token_auth

@NicholasLYang
Copy link
Author

Main issue with just creating the user is it doesn't trigger the confirmable email. Though actually...I can just do that manually. Alright, that works. Thanks!

@zachfeldman
Copy link
Contributor

@NicholasLYang you're welcome! We're always welcoming new contributors....if you have time, check out the issue queue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants