Upgrade to v3
Breaking changes from PassageJS v2 to v3
Session methods
Prior to v3 the User class had methods focused on retrieving, setting, and removing tokens. These methods have been moved to the new Session class.
Method | V2 | V3 |
---|---|---|
.signOut() | User.signOut | Session.signOut |
.getAuthToken() | User.getAuthToken | Session.getAuthToken |
.refresh() | User.refresh | Session.refresh |
.authGuard() | User.authGuard | Session.authGuard |
External auth taboken
Prior to v3 .getCurrentUser
accepted an optional parameter of an external auth token.
In v3 getCurrentUser
does not accept any parameters. Under the hood it uses the default or externally defined Token Store to build the current user request.