From b18ecef3a456fefebc83baf570b768f4ad177094 Mon Sep 17 00:00:00 2001 From: frontegg Date: Mon, 11 Nov 2024 00:32:27 +0000 Subject: [PATCH 1/5] chore(release): publish 1.2.9 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2c4beb4..3b433c5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@frontegg/react-native", - "version": "1.2.8", + "version": "1.2.9", "description": "Frontegg React-Native SDK", "main": "lib/commonjs/index", "module": "lib/module/index", From e2d7ca12b5e9142fc2941faf0ddeadb1d20d6c89 Mon Sep 17 00:00:00 2001 From: Diana Khortiuk Date: Fri, 15 Nov 2024 13:13:56 +0200 Subject: [PATCH 2/5] updated documentation --- README.md | 103 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) diff --git a/README.md b/README.md index 5ac6673..60d4f3e 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ features for the product-led era. - [Wrap your app with FronteggProvider](#wrap-your-app-with-fronteggprovider) - [Login with frontegg](#login-with-frontegg) - [Check if user is authenticated](#check-if-user-is-authenticated) + - [Passkeys Authentication](#passkeys-authentication) ## Project Requirements @@ -530,3 +531,105 @@ export default function HomeScreen() { } ``` + +## Passkeys Authentication + +Passkeys provide a seamless, passwordless authentication experience, leveraging platform-level biometric authentication and WebAuthn. Follow the steps below to integrate passkeys functionality into your iOS app. + +### Prerequisites + +1. **iOS Version**: Ensure your project targets **iOS 15 or later** to support the necessary WebAuthn APIs. +2. **Associated Domain**: Configure your app's associated domains to enable passkeys functionality. +3. **Frontegg SDK Version**: Use Frontegg iOS SDK version **1.2.24 or later**. + +--- + +## Setup + +### Android Setup + +1. **Update Gradle Dependencies**: + Add the following dependencies in your `android/build.gradle`: + ```groovy + dependencies { + implementation 'androidx.browser:browser:1.8.0' + implementation 'com.frontegg.sdk:android:1.2.30' + } + ``` + +2. **Java Compatibility**: + Ensure sourceCompatibility and targetCompatibility are set to Java 8 in android/app/build.gradle**: +```groovy + android { + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } +} +``` + +### IOS Setup + +1. **Set up the Associated Domains Capability**: + - Open your project in Xcode. + - Go to the **Signing & Capabilities** tab. + - Add **Associated Domains** under the **+ Capability** section. + - Enter the domain for your app in the format: + ``` + webcredentials:[YOUR_DOMAIN] + ``` + Example: + ``` + webcredentials:example.com + ``` + +2. **Host the WebAuthn Configuration File**: + - Add a `.well-known/webauthn` JSON file to your domain server with the following structure: + ```json + { + "origins": [ + "https://example.com", + "https://subdomain.example.com" + ] + } + ``` + - Ensure this file is publicly accessible at `https://example.com/.well-known/webauthn`. + +3. **Test Associated Domains**: + - Verify that your associated domain configuration works using Apple's [Associated Domains Validator](https://developer.apple.com/contact/request/associated-domains). + + +### Using Passkeys +The following examples demonstrate how to use the React Native SDK's Passkeys functions. + +### Registering Passkeys +Use the registerPasskeys method to register a passkey for the current user. + +```typescript +import { registerPasskeys } from '@frontegg/react-native'; + +async function handleRegisterPasskeys() { + try { + await registerPasskeys(); + console.log('Passkeys registered successfully'); + } catch (error) { + console.error('Error registering passkeys:', error); + } +} +``` + +### Login with Passkeys +Use the loginWithPasskeys method to authenticate users using passkeys. + +```typescript +import { loginWithPasskeys } from '@frontegg/react-native'; + +async function handleLoginWithPasskeys() { + try { + await loginWithPasskeys(); + console.log('Passkeys login successful'); + } catch (error) { + console.error('Error logging in with Passkeys:', error); + } +} +``` \ No newline at end of file From 94d80cb73b99c49ccd52cab17d1065a7c996dfab Mon Sep 17 00:00:00 2001 From: Diana Khortiuk Date: Fri, 15 Nov 2024 13:18:11 +0200 Subject: [PATCH 3/5] Revert "updated documentation" This reverts commit e2d7ca12b5e9142fc2941faf0ddeadb1d20d6c89. --- README.md | 103 ------------------------------------------------------ 1 file changed, 103 deletions(-) diff --git a/README.md b/README.md index 60d4f3e..5ac6673 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,6 @@ features for the product-led era. - [Wrap your app with FronteggProvider](#wrap-your-app-with-fronteggprovider) - [Login with frontegg](#login-with-frontegg) - [Check if user is authenticated](#check-if-user-is-authenticated) - - [Passkeys Authentication](#passkeys-authentication) ## Project Requirements @@ -531,105 +530,3 @@ export default function HomeScreen() { } ``` - -## Passkeys Authentication - -Passkeys provide a seamless, passwordless authentication experience, leveraging platform-level biometric authentication and WebAuthn. Follow the steps below to integrate passkeys functionality into your iOS app. - -### Prerequisites - -1. **iOS Version**: Ensure your project targets **iOS 15 or later** to support the necessary WebAuthn APIs. -2. **Associated Domain**: Configure your app's associated domains to enable passkeys functionality. -3. **Frontegg SDK Version**: Use Frontegg iOS SDK version **1.2.24 or later**. - ---- - -## Setup - -### Android Setup - -1. **Update Gradle Dependencies**: - Add the following dependencies in your `android/build.gradle`: - ```groovy - dependencies { - implementation 'androidx.browser:browser:1.8.0' - implementation 'com.frontegg.sdk:android:1.2.30' - } - ``` - -2. **Java Compatibility**: - Ensure sourceCompatibility and targetCompatibility are set to Java 8 in android/app/build.gradle**: -```groovy - android { - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } -} -``` - -### IOS Setup - -1. **Set up the Associated Domains Capability**: - - Open your project in Xcode. - - Go to the **Signing & Capabilities** tab. - - Add **Associated Domains** under the **+ Capability** section. - - Enter the domain for your app in the format: - ``` - webcredentials:[YOUR_DOMAIN] - ``` - Example: - ``` - webcredentials:example.com - ``` - -2. **Host the WebAuthn Configuration File**: - - Add a `.well-known/webauthn` JSON file to your domain server with the following structure: - ```json - { - "origins": [ - "https://example.com", - "https://subdomain.example.com" - ] - } - ``` - - Ensure this file is publicly accessible at `https://example.com/.well-known/webauthn`. - -3. **Test Associated Domains**: - - Verify that your associated domain configuration works using Apple's [Associated Domains Validator](https://developer.apple.com/contact/request/associated-domains). - - -### Using Passkeys -The following examples demonstrate how to use the React Native SDK's Passkeys functions. - -### Registering Passkeys -Use the registerPasskeys method to register a passkey for the current user. - -```typescript -import { registerPasskeys } from '@frontegg/react-native'; - -async function handleRegisterPasskeys() { - try { - await registerPasskeys(); - console.log('Passkeys registered successfully'); - } catch (error) { - console.error('Error registering passkeys:', error); - } -} -``` - -### Login with Passkeys -Use the loginWithPasskeys method to authenticate users using passkeys. - -```typescript -import { loginWithPasskeys } from '@frontegg/react-native'; - -async function handleLoginWithPasskeys() { - try { - await loginWithPasskeys(); - console.log('Passkeys login successful'); - } catch (error) { - console.error('Error logging in with Passkeys:', error); - } -} -``` \ No newline at end of file From c20333ea6962838f8066139a1088ec648700909f Mon Sep 17 00:00:00 2001 From: Diana Khortiuk Date: Fri, 15 Nov 2024 13:13:56 +0200 Subject: [PATCH 4/5] updated documentation --- README.md | 103 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) diff --git a/README.md b/README.md index 5ac6673..60d4f3e 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ features for the product-led era. - [Wrap your app with FronteggProvider](#wrap-your-app-with-fronteggprovider) - [Login with frontegg](#login-with-frontegg) - [Check if user is authenticated](#check-if-user-is-authenticated) + - [Passkeys Authentication](#passkeys-authentication) ## Project Requirements @@ -530,3 +531,105 @@ export default function HomeScreen() { } ``` + +## Passkeys Authentication + +Passkeys provide a seamless, passwordless authentication experience, leveraging platform-level biometric authentication and WebAuthn. Follow the steps below to integrate passkeys functionality into your iOS app. + +### Prerequisites + +1. **iOS Version**: Ensure your project targets **iOS 15 or later** to support the necessary WebAuthn APIs. +2. **Associated Domain**: Configure your app's associated domains to enable passkeys functionality. +3. **Frontegg SDK Version**: Use Frontegg iOS SDK version **1.2.24 or later**. + +--- + +## Setup + +### Android Setup + +1. **Update Gradle Dependencies**: + Add the following dependencies in your `android/build.gradle`: + ```groovy + dependencies { + implementation 'androidx.browser:browser:1.8.0' + implementation 'com.frontegg.sdk:android:1.2.30' + } + ``` + +2. **Java Compatibility**: + Ensure sourceCompatibility and targetCompatibility are set to Java 8 in android/app/build.gradle**: +```groovy + android { + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } +} +``` + +### IOS Setup + +1. **Set up the Associated Domains Capability**: + - Open your project in Xcode. + - Go to the **Signing & Capabilities** tab. + - Add **Associated Domains** under the **+ Capability** section. + - Enter the domain for your app in the format: + ``` + webcredentials:[YOUR_DOMAIN] + ``` + Example: + ``` + webcredentials:example.com + ``` + +2. **Host the WebAuthn Configuration File**: + - Add a `.well-known/webauthn` JSON file to your domain server with the following structure: + ```json + { + "origins": [ + "https://example.com", + "https://subdomain.example.com" + ] + } + ``` + - Ensure this file is publicly accessible at `https://example.com/.well-known/webauthn`. + +3. **Test Associated Domains**: + - Verify that your associated domain configuration works using Apple's [Associated Domains Validator](https://developer.apple.com/contact/request/associated-domains). + + +### Using Passkeys +The following examples demonstrate how to use the React Native SDK's Passkeys functions. + +### Registering Passkeys +Use the registerPasskeys method to register a passkey for the current user. + +```typescript +import { registerPasskeys } from '@frontegg/react-native'; + +async function handleRegisterPasskeys() { + try { + await registerPasskeys(); + console.log('Passkeys registered successfully'); + } catch (error) { + console.error('Error registering passkeys:', error); + } +} +``` + +### Login with Passkeys +Use the loginWithPasskeys method to authenticate users using passkeys. + +```typescript +import { loginWithPasskeys } from '@frontegg/react-native'; + +async function handleLoginWithPasskeys() { + try { + await loginWithPasskeys(); + console.log('Passkeys login successful'); + } catch (error) { + console.error('Error logging in with Passkeys:', error); + } +} +``` \ No newline at end of file From 555b237c306b9003eab0f5c444cad57177c25b21 Mon Sep 17 00:00:00 2001 From: Diana Khortiuk Date: Fri, 15 Nov 2024 13:19:45 +0200 Subject: [PATCH 5/5] updated documentation --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 60d4f3e..b30baec 100644 --- a/README.md +++ b/README.md @@ -539,8 +539,8 @@ Passkeys provide a seamless, passwordless authentication experience, leveraging ### Prerequisites 1. **iOS Version**: Ensure your project targets **iOS 15 or later** to support the necessary WebAuthn APIs. -2. **Associated Domain**: Configure your app's associated domains to enable passkeys functionality. -3. **Frontegg SDK Version**: Use Frontegg iOS SDK version **1.2.24 or later**. +3. **Android**: Use **Android SDK 26+**. +5. **Frontegg SDK Version**: Use Frontegg iOS SDK version **1.2.24 or later**. ---