Open kf106 opened 1 year ago
Do you have this in your sdl? https://github.com/oneclickdapp/ethereum-auth/blob/e7010d08c5d25424dedf6ad1d39b122786cc77bc/examples/eth-auth-demo/api/src/graphql/ethereumAuth.sdl.js#L10
It might need to be changed from 'input' to 'type'
I think this sdl may not be correct.
I combined the one you linked with this one to get this and it did work
export const schema = gql`
type AuthDetail {
id: String!
nonce: String!
timestamp: DateTime!
User: User
}
type Query {
authDetails: [AuthDetail!]! @skipAuth
}
input CreateAuthDetailInput {
nonce: String!
timestamp: DateTime!
}
input UpdateAuthDetailInput {
nonce: String
timestamp: DateTime
}
type AuthChallengeResult {
message: String!
}
type AuthVerifyResult {
token: String!
}
input AuthChallengeInput {
address: String!
options: JSON
}
input AuthVerifyInput {
signature: String!
address: String!
options: JSON
}
type Mutation {
authChallenge(input: AuthChallengeInput!): AuthChallengeResult @skipAuth
authVerify(input: AuthVerifyInput!): AuthVerifyResult @skipAuth
}
`
I'm getting an error in the client, "Error @oneclickdapp/ethereum-auth login(): Error: Couldn't get auth challenge from your server. See above error for more details" which I presume is because of the following error on the server:
I can see that ethereumAuth.js is supposed to provide the challenge, but I'm guessing something isn't updated in the gql types, or isn't set up properly, when following the README.md.