From 5440bc286291be535628a3b1c9b458401178e9c4 Mon Sep 17 00:00:00 2001 From: David Revelo Date: Sun, 7 Aug 2022 13:52:17 +0200 Subject: [PATCH] Fix DTA cookies not set when app configured for it --- lib/graphql_devise/mutations/login.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/graphql_devise/mutations/login.rb b/lib/graphql_devise/mutations/login.rb index 9d35f79f..0df4a681 100644 --- a/lib/graphql_devise/mutations/login.rb +++ b/lib/graphql_devise/mutations/login.rb @@ -21,6 +21,9 @@ def resolve(email:, password:) new_headers = set_auth_headers(resource) controller.sign_in(:user, resource, store: false, bypass: false) + controller.resource = resource + controller.token.client = new_headers['client'] + controller.token.token = new_headers['access-token'] yield resource if block_given?