Skip to content

v0.3.0

Compare
Choose a tag to compare
@simeng-li simeng-li released this 20 Aug 06:34
· 10 commits to master since this release
7687c31

Feature update

Add a new isInitialized flag to the logtoContext. This field indicates whether the logtoClient has successfully loaded the authentication status from local storage. Initially set to false, it will be updated to true once the authentication status is fully loaded.

E.g.

const Page = () => {
  const {signIn, signOut, isInitialized, isAuthenticated} = useLogto();

  if (!isInitialized) {
   return "loading...";
  }

  return isAuthenticated ? <Button title="Sign In" onPress={async () => signIn()} /> : <Button title="Sign out" onPress={async () => signOut()} /> 
}