jamesedmonston / graphql-authentication

GraphQL authentication for your headless Craft CMS applications.
Other
28 stars 22 forks source link

Authenticate by username #126

Closed anchovy closed 1 year ago

anchovy commented 1 year ago

Hi, Any any to authenticate by username rather than email? Or - can we add another field to authenticate by as well, so we pass in 3 variables, email, password, client number.

jamesedmonston commented 1 year ago

You should be able to pass the username into the email field. The authenticate mutation calls Craft’s getUserByUsernameOrEmail method: https://github.com/jamesedmonston/graphql-authentication/blob/develop/src/services/UserService.php#L129