Skip to content

Commit 59b4996

Browse files
Update JWT Payload
1 parent 6f0e15b commit 59b4996

File tree

1 file changed

+1
-1
lines changed
  • app/graph/authentication/mutations

1 file changed

+1
-1
lines changed

app/graph/authentication/mutations/login.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def login_user!(credentials)
2323
user = User.find_by(email: credentials[:email])
2424
raise StandardError unless user&.authenticate(credentials[:password])
2525

26-
token = JwtHelper.encode_token({ user_id: user.id })
26+
token = JwtHelper.encode_token({ email: user.email, user_id: user.id })
2727
{ user: user, token: token }
2828
end
2929
end

0 commit comments

Comments
 (0)