Oauth2 Authorize not setting session variables

Hi All,
Don’t know if anyone can help me at all?
I have an OAuth2 authorize step that is functioning correctly (all steps complete access/refresh tokens are returned if I output the step).
However the session variables for the tokens aren’t getting created or set (except for one called name-of-my-oauth-global_state with a new value after every successful login).
If I add my own session variable step after the authorize step nothing gets created, but if I put it before it does work.
Any help is gratefully appreciated.
Many thanks Jon