Missing sessionToken after initial sign up

I have posted this issue originally on Stackoverflow but got no response.

For my React Native app I am using Parse JS SDK and hosted Parse Server on Back4app.
When I try to register a new user, the user is not authenticated because the response does not return a sessionToken.

However, once the user is in the db and signs in a sessionToken is returned and the user is authenticated successfully.

Request

The request is the same for sign in/up.

await Parse.User.logInWith('google', {
  // auth data received from @react-native-community/google-signin
  authData: {
    id,
    id_token: token
  }
})

Response on initial Sign Up

The response is supposed to return a sessionToken which is missing. So the user is not authenticated and modifications on the user object are not possible.

{
  "authData": {...}, 
  "createdAt": "...", 
  "objectId": "...", 
  "updatedAt": "...", 
  "username": "..."
}

Response on sign in after user was created

{
  "ACL": {...}, 
  "authData": {...}, 
  "createdAt": "...", 
  "objectId": "...", 
  "sessionToken": "...", 
  "updatedAt": "...", 
  "username": "..."
}

I don’t use any cloud code. Just a simple auth flow with Google oAuth.

Any help is highly appreciated.

Same issue for ‘sign in with Apple’

Hey @pawelsas! As far as I know, according to the Official Documentation, Parse will respond 200 (HTTP OK) and include the Session Token only when it verifies the user is already associated with the OAuth authentication data.
So, again, as far as I know, the very first request when you create the user, will not contain the sessionToken.

1 Like

Great one nice