Strawberry with social_django

Strawberry with social_django


0

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
1


-1

Made a library for this inspired by nrbnlulu/strawberry-django-auth

Check it out here

2



Leave a Reply

Your email address will not be published. Required fields are marked *