The Open Source Firebase Alternative with GraphQL.
MIT License
Bot releases are visible (Hide)
Published by github-actions[bot] over 2 years ago
Published by github-actions[bot] over 2 years ago
refreshToken
and type
from the url when the user is already signed inPublished by github-actions[bot] over 2 years ago
refreshToken
, but it is not stored using the same key in localStorage / the cookie. This fix makes the right correspondance between the two.
Published by github-actions[bot] over 2 years ago
Published by github-actions[bot] over 2 years ago
Published by plmercereau over 2 years ago
refreshToken
from the url when autoSignIn
is setautoSignIn
option is set to true
, the client now removes it from the URL when the page loads.useDecodedAccessToken()
, useHasuraClaims()
, and useHasuraClaim(name: string)
useLayoutEffect
from logssuppressConsoleMessage
method was meant to suppress incorrect useLayoutEffect
messages raised on Nextjs server-side renderings. Its implementation had an impact on the normal functionning of logging (see #447).4.31.0
)Published by plmercereau over 2 years ago
refreshToken
from the url when autoSignIn
is setautoSignIn
option is set to true
, the client now removes it from the URL when the page loads.autoSignin
was active, the client was fetching the refresh token twice on startup. This behaviour has been corrected.AuthClientSSR
to AuthCookieClient
AuthClientSSR
has been renamed to AuthCookieClient
and is now deprecated4.31.0
)Published by plmercereau over 2 years ago
auth.getDecodedAccessToken()
, auth.getHasuraClaims()
, and auth.getHasuraClaim(name: string)
4.31.0
)autoLogin
to autoSignIn
, and deprecate autoLogin
sign in
rather than login
. This version reflect this terminology in the NhostClient
optionsPublished by plmercereau over 2 years ago
autoLogin
to autoSignIn
, and deprecate autoLogin
sign in
rather than login
. This version reflect this terminology in the NhostClient
optionsPublished by plmercereau over 2 years ago
4.31.0
)Published by github-actions[bot] over 2 years ago
Published by github-actions[bot] over 2 years ago
b52b4fc: Introduce createServerSideNhostClient
Until now, the Nhost client was not functionning correctly on the server side.
The createServerSideNhostClient
can be called inside the getServerSideProps
function of a page.
When called, it will try to get the refesh token in cookies, or from the request URL.
If a refresh token is found, it uses it to get an up to date access token (JWT) and a user session
This method returns a promise of an NhostClient
and resolves only when the authentication status is known eventually.
getNhostSession
now uses the above method under the hood to extract the user session and hydrate the NhostClient context on the client side.
616e320: Look for the refresh token both in the query parameters and in the hash
Until now, after redirecting from an email, Hasura-auth puts refresh tokens in the hash part of the url. It is a problem when using SSR as the hash is not accessible to the server. This behaviour is likely to change. As a result, the client now parses both the hash and the query parameters of the url.
See this issue to keep track of the progress on Hasura-auth.
useLayoutEffect
from logssuppressConsoleMessage
method was meant to suppress incorrect useLayoutEffect
messages raised on Nextjs server-side renderings. Its implementation had an impact on the normal functionning of logging (see #447).4.31.0
)Published by github-actions[bot] over 2 years ago
Published by github-actions[bot] over 2 years ago
refreshSession
Published by github-actions[bot] over 2 years ago
Published by github-actions[bot] over 2 years ago
Published by github-actions[bot] over 2 years ago
Published by github-actions[bot] over 2 years ago
5ee395e: Ensure the session is destroyed when signout is done
The user session, in particular the access token (JWT), was still available after sign out.
Any information about user session is now removed from the auth state as soon as the sign out action is called.
e0cfcaf: fix and improve nhost.auth.refreshSession
nhost.auth.refreshSession
is now functional and returns possible errors, or the user session if the token has been sucessfully refreshed.
If the user was previously not authenticated, it will sign them in. See #286
7b7527a: Improve reliability of the token refresher
The token refresher had an unreliable behaviour, leading to too many refreshes, or refreshes that are missed, leading to an expired access token (JWT).
The internal refresher rules have been made more explicit in the code. Every second, this runs:
refreshIntervalTime
and the interval between when the last access token has been created and now is more than this value, then it triggers a refreshIf a refresh fails, then it switches to a specific rule: it will make an attempt to refresh the token every five seconds
Published by github-actions[bot] over 2 years ago
nhost.auth.refreshSession
nhost.auth.refreshSession
is now functional and returns possible errors, or the user session if the token has been sucessfully refreshed.Published by github-actions[bot] over 2 years ago