express-stormpath icon indicating copy to clipboard operation
express-stormpath copied to clipboard

Updating data in Okta portal is overwritten if user is logged in

Open atrp opened this issue 8 years ago • 0 comments

Example: If we update a custom field in Okta and logout out from our application and log back in the data we previously saved in Okta is replaced by the data stored in the users's session even though they logged out.

We do want to update a custom filed when we login (but apparently it updates all custom data which also has the previous data stored in the session).

    postLoginHandler: function(acct, req, res, next) {
        acct.customData.lastLogin = moment().tz('America/Chicago').format('YYYY-MM-DD');
        acct.customData.save();
        next();
    },

This could be related to https://github.com/stormpath/express-stormpath/issues/605

atrp avatar Aug 22 '17 18:08 atrp