How to capture errors when login with 3rd-party service by redirect?

The page will reload, so we lose the callback. How to capture the errors if the login(create user) process failed? Thanks

You can capture them on the server side … Or set them as a session variable