UNPKG

@ubuilder/auth

Version:

UBuilder Auth

129 lines (88 loc) 2.55 kB
# Changes from v8 ## 8.4 * add restOptions for rest modification. * call refresh on initialization. ### 8.4.1 * add onUserChanged handler. ### 8.4.2 * add Auth.initialized(): Promise<void> for waiting auth initialize. * add Auth.refreshToken() for current user refresh. * Assign unexpired storage user on initialization. ### 8.4.3 * add User.sessionExpireAt property. * add typescript interface UserDetails for typed User.details. ### 8.4.4 * rest call postponed until initialized. ### 8.4.5 * fix token refresh concurrency issue. ### 8.4.6 * fix browser refresh issue. ## 8.3 * add login() with object request ### 8.3.1 * bug fix on login(username, password, remember). ## 8.2 * add onUserChanged() for convinience. ## 8.1 * User is now reactive object. * User.isLoggedIn() is changed to reactive property User.isLoggedIn. * User.isExpired() is removed. (remains as internal use) ### 8.1.16 * Add Vue's ComponentCustomProperties declaration. ### 8.1.13 * Add Auth.changePassword(oldPassword, newPassword). ### 8.1.10 * Exports Rest API. ### 8.1.9 * Support Vue 2.7+ ### 8.1.8 * Catch refresh RestError on initialize. ### 8.1.7 * Refresh catches RestError 401. ### 8.1.3 * Check refresh on user token expired. ### 8.1.2 * User reactivity fix. ### 8.1.1 * Auth.login() returns reactive object. ## 8.0 UBuilder Auth v8. ### 8.0.18 * logout on refresh failed. ### 8.0.17 * dep: @ubuilder/rest 8.1.5. ### 8.0.16 * bug fix: api interceptor context. ### 8.0.15 (Unpublished) * bug fix: user access throws undefined. ### 8.0.14 (Unpublished) * useAuth(), useRest(), currentUser() supports call outside setup context. ### 8.0.13 * bug fix: Bearer on authorization. ### 8.0.12 (Unpublished) * add Auth.rest() and useRest(). ### 8.0.11 (Unpublished) * bug fix: interceptor call on refresh. ### 8.0.10 (Unpublished) * bug fix: expire time calculation. ### 8.0.9 (Unpublished) * bug fix: isExpired check. ### 8.0.8 (Unpublished) * bug fix: authorization header typo. ### 8.0.7 (Unpublished) * bug fix: login method. ### 8.0.6 (Unpublished) * set credentials: 'include' on login. ### 8.0.5 (Unpublished) * set credentials: 'include' on interceptor. ### 8.0.4 (Unpublished) * bug fix: user reactivity. ### 8.0.3 (Unpublished) * bug fix: currentUser injection returns undefined on setup context. ### 8.0.2 (Unpublished) * add inject function currentUser(key?: string), useAuth(key?: string). * provide user as ComputedRef. ### 8.0.1 (Unpublished) * bug fix: Parsing response error. ### 8.0.0 (Unpublished) * Initial release.