API Authorization problem


#1

Hi,

I am in the works of using GraphQL API to read and update comments in a native iOS app. Part of the problem is getting the sign-in working properly. In our case, we use Google and Facebook auth plugins in website, and would like to allow iOS app users to sign in using Google and Facebook as well.

The way I imagined this could work is to sign in using Google native SDK, get a serverAuthToken from Google user properties, use that for a callback to /api/v1/auth/google/callback and get a authorisation token for use with GraphQL API calls from callback when the request returns, using a cookie store.

While I got RootQuery/me query working properly, returning the Coral Talk user with username derived from Google account username, using the authorisation cookie value as token in API query request, the same cookie value does not seem to work with mutation for creating a comment. I get NOT_AUTHORIZED error. Is this how this is supposed to work, and what am I missing to get the auth token working with createComment mutation query?

br,
– Pasi


#2

Hey Pasi, unfortunately this won’t work, we don’t support your native login methods, and you’ll need to use our auth windows instead.

If you have further questions you can sometimes get quicker responses on Github, you can also get info from our community and contributors: https://github.com/coralproject/talk/issues