How can I use social_django with strawberry graphql? With graphene
, I inherited my strawberry.type
from SocialAuthJWT
I used in grapgene like this.
class SocialAuth(graphql_social_auth.SocialAuthJWT):
user = graphene.Field(UserType)
@classmethod
def resolve(cls, root, info, social, **kwargs):
social.user.is_verified = True
social.user.save()
token = get_token(social.user)
return cls(user=social.user, token=token)
I’d like to log in with google.
1 Answer
Made a library for this inspired by nrbnlulu/strawberry-django-auth
Check it out here
2
-
1
Please don't just post some tool or library as an answer. At least demonstrate how it solves the problem in the answer itself.
– Jesse2 hours ago
-
A link to a solution is welcome, but please ensure your answer is useful without it: add context around the link so your fellow users will have some idea what it is and why it is there, then quote the most relevant part of the page you are linking to in case the target page is unavailable. Answers that are little more than a link may be deleted.
– Vickel2 hours ago