Releases: logto-io/react-native
Releases · logto-io/react-native
v0.4.0
Feature update
- Update the
@logto/client
dependency to access support for the latest authentication parameters.
Previous sign-in method:
async signIn(redirectUri: string, interactionMode?: InteractionMode): Promise<void>
Updated sign-in method (backward compatible via function overloading):
override async signIn(options: SignInOptions): Promise<void>;
Newly supported sign-in parameters are:
- prompt: The OIDC prompt parameter to be used for the authorization request. If specified, it will override the default prompt value (
consent
) in Logto configs. - firstScreen: Customize the first screen users see when they start the authentication process. Learn more.
- identifiers: Combined with the
firstScreen
parameter, specify the focused identifier type in the sign-in or sign-up page. Learn more. - directSignIn: This parameter bypasses the default sign-in page and invokes a direct social or enterprise SSO sign-in flow. Learn more
- loginHint: Prepopulate an identifier value to the sign-in and sign-up form. E.g.
username
oremail
. - extraParams: Extra parameters for the authentication request.
Improvement
Removed the conditional shim
exports entry point. The unstable_enablePackageExports
setting in Metro is no longer needed, as it may cause issues in other packages. Check this PR for more details.
v0.3.0
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()} />
}
v0.2.0
What's Changed
- feat: add the expo web platform support by @simeng-li in #22
- chore: upgrade packages by @gao-sun in #23
- chore(deps): upgrade pnpm to 9 by @gao-sun in #26
- chore(deps)!: upgrade peer dependencies by @gao-sun in #25
- refactor!: remove polyfill and fix encoding issue by @gao-sun in #27
- release: v0.2.0 by @gao-sun in #28
Full Changelog: v0.1.0...v0.2.0