I just went from 0.6.7 to 0.8.0 in order to get the testing package, but now I can't log in to my app. I'm using a custom authorizer and authenticator. The authentication appears to work fine, in that a session object is returned with the props set, e.g.:
{
"auth_token" : "QsWF31u1Tz4wUvymWQX7BBn9v1m4WzzEgZ5qj2uWdMa5k7rbH11FAPIglOnxHb3x",
"account_id" : "b123456",
"full_name" : "Bruce Wayne",
"role" : "superhero"
}
However, in the authorize
function of my authorizer, session.auth_token
, session.account_id
and the rest are undefined
.
The only change is the version bump, and I can't figure out what I need to do as no errors are sent out to the console, except for the one that says I'm not authorized to go to the route I tried to access (because of course the session didn't have the props, so the authorization failed).
Here is the Gist of my authenticator and authorizer.
Update: while stepping through the code, I get to the check for session.isAuthenticated
and it's true
, so that's getting set, but none of the other session properties are "persisting" so to speak.
Everything the authenticator resolves with from the authenticate
method is now stored in session.secure
so instead of session.auth_token
you would now do session.secure.auth_token
.