Closed roylanmartinez closed 3 years ago
I solved it using the following mutation:
class SocialAuth(graphql_social_auth.SocialAuthMutation):
token = graphene.String()
refresh_token = graphene.String()
@classmethod
def resolve(cls, root, info, social, **kwargs):
if social.user.refresh_tokens.count() >= 1:
return cls(token=get_token(social.user), refresh_token=social.user.refresh_tokens.last())
else:
return cls(token=get_token(social.user), refresh_token=create_refresh_token(social.user))
I tried to get the refreshToken but I could not.