parse-server icon indicating copy to clipboard operation
parse-server copied to clipboard

Facebook login : The session has been invalidated because the user has changed the password

Open umusset opened this issue 10 years ago • 4 comments

For implementation related questions or technical support, please refer to the Stack Overflow and Server Fault communities.

Make sure these boxes are checked before submitting your issue -- thanks for reporting issues back to Parse Server!

Environment Setup

Parse Server 2.2.0

Steps to reproduce

Very easy to reproduce

  1. Facebook log in with a user
  2. User change their facebook's password
  3. Try to re-log in -> Error : The session has been invalidated because the user has changed the password

I try to unlink the facebook account but now the user is link with nothing, so he can't log in with facebook anymore...

Thanks !

umusset avatar Mar 19 '16 02:03 umusset

You should ask for a new token from the Facebook SDK directly. then link your user with the new token.

flovilmart avatar Mar 19 '16 17:03 flovilmart

Thanks ! I find after 4h :)

For the others, you can use

PFFacebookUtils.unlinkUserInBackground(PFUser.currentUser()!, block: { (bol, ero) -> Void in
                        PFFacebookUtils.linkUserInBackground(PFUser.currentUser()!, withReadPermissions: ["public_profile","user_friends","email"], block: { (bolo, eror) -> Void in

                        })
                    })

when you detect the error

umusset avatar Mar 19 '16 17:03 umusset

You may not even need to unlink I believe

flovilmart avatar Mar 19 '16 17:03 flovilmart

Yes, it's works !

umusset avatar Mar 19 '16 17:03 umusset