Skip to content

Commit

Permalink
Merge pull request #938 from Web3Auth/sfa-swift
Browse files Browse the repository at this point in the history
[SFA iOS] Update docs to add support for MacOS
  • Loading branch information
shahbaz17 authored Oct 15, 2024
2 parents 1b7c31c + 0599541 commit 4278dc9
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 27 deletions.
2 changes: 1 addition & 1 deletion docs/sdk/core-kit/sfa-android/usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ users and obtain their private and public keys.

:::tip NOTE

Web3Auth SFA iOS SDK only works for users who have **not enabled MFA**. For MFA enabled users,
Web3Auth SFA Android SDK only works for users who have **not enabled MFA**. For MFA enabled users,
you'll see an Error message.

:::
Expand Down
4 changes: 2 additions & 2 deletions docs/sdk/core-kit/sfa-ios/authentication.mdx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: "Authentication in Core Kit SFA iOS SDK"
title: "Authentication in Core Kit SFA Swift SDK"
sidebar_label: "Authentication"
description:
"Web3Auth Core Kit Single Factor Auth iOS SDK - Authentication | Documentation - Web3Auth"
"Web3Auth Core Kit Single Factor Auth Swift SDK - Authentication | Documentation - Web3Auth"
---

import AuthenticationInSFA from "@site/src/common/sdk/core-kit/sfa/_auth_in_core_kit_sfa.mdx";
Expand Down
4 changes: 2 additions & 2 deletions docs/sdk/core-kit/sfa-ios/examples.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Examples - Core Kit SFA iOS SDK
title: Examples - Core Kit SFA Swift SDK
sidebar_label: Examples
description: "Core Kit SFA iOS Examples | Documentation - Web3Auth"
description: "Core Kit SFA Swift Examples | Documentation - Web3Auth"
hide_table_of_contents: true
---

Expand Down
4 changes: 2 additions & 2 deletions docs/sdk/core-kit/sfa-ios/initialize.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Initializing SFA iOS SDK
title: Initializing SFA Swift SDK
sidebar_label: Initialize
description: "Web3Auth SFA iOS SDK - Initialization | Documentation - Web3Auth"
description: "Web3Auth SFA Swift SDK - Initialization | Documentation - Web3Auth"
---

import Initialization from "@site/src/common/sdk/core-kit/sfa/ios/_sfa-ios-initialization.mdx";
Expand Down
4 changes: 2 additions & 2 deletions docs/sdk/core-kit/sfa-ios/install.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Installing SFA iOS SDK"
title: "Installing SFA Swift SDK"
sidebar_label: "Install"
description: "Installing Web3Auth SFA iOS SDK | Documentation - Web3Auth"
description: "Installing Web3Auth SFA Swift SDK | Documentation - Web3Auth"
---

import SPM from "@site/src/common/sdk/core-kit/sfa/ios/_sfa-ios-spm.mdx";
Expand Down
17 changes: 9 additions & 8 deletions docs/sdk/core-kit/sfa-ios/sfa-ios.mdx
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
---
title: "Web3Auth Core Kit Single Factor Auth iOS SDK"
title: "Web3Auth Core Kit Single Factor Auth Swift SDK"
sidebar_label: Overview
description: "Web3Auth Core Kit Single Factor Auth iOS SDK | Documentation - Web3Auth"
description: "Web3Auth Core Kit Single Factor Auth Swift SDK | Documentation - Web3Auth"
---

You can use the Web3Auth
[Single Factor Auth iOS SDK](https://github.com/Web3Auth/single-factor-auth-swift) as a library for
your iOS app to authenticate users through Web3Auth. The SDK is written in Swift and allows for
native use of the One Key flow, which starts with just one share of the key. This means that users
can authenticate without redirection in a single key pair flow.
[Single Factor Auth Swift SDK](https://github.com/Web3Auth/single-factor-auth-swift) as a library
for your iOS, and macOS app to authenticate users through Web3Auth. The SDK is written in Swift and
allows for native use of the One Key flow, which starts with just one share of the key. This means
that users can authenticate without redirection in a single key pair flow.

Using the Web3Auth SFA iOS SDK, you can authenticate users and reconstruct their private keys
Using the Web3Auth SFA Swift SDK, you can authenticate users and reconstruct their private keys
quickly and easily. Additionally, you can use the Web3Auth Plug and Play iOS SDK to redirect users
to a Web3Auth-hosted screen (`https://auth.web3auth.io`), which is suitable for most use cases.
However, if you want more control over the UI and UX of the authentication process, you can
customize the authentication flow to avoid redirection. This is possible with the new Web3Auth SFA
iOS SDK, which allows you to use Web3Auth SFA iOS and prevent redirection to Openlogin-hosted
Swift SDK, which allows you to use Web3Auth SFA Swift and prevent redirection to Openlogin-hosted
screens.

### Requirements

- iOS 14+
- macOS 11+

:::note

Expand Down
6 changes: 3 additions & 3 deletions docs/sdk/core-kit/sfa-ios/usage.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Using Core Kit SFA iOS SDK"
title: "Using Core Kit SFA Swift SDK"
sidebar_label: "Usage"
description: "Web3Auth Core Kit Single Factor Auth iOS SDK - Usage | Documentation - Web3Auth"
description: "Web3Auth Core Kit Single Factor Auth Swift SDK - Usage | Documentation - Web3Auth"
---

import TabItem from "@theme/TabItem";
Expand All @@ -14,7 +14,7 @@ users and obtain their private and public keys.

:::tip NOTE

Web3Auth SFA iOS SDK only works for users who have **not enabled MFA**. For MFA enabled users,
Web3Auth SFA Swift SDK only works for users who have **not enabled MFA**. For MFA enabled users,
you'll see an Error message.

:::
Expand Down
5 changes: 3 additions & 2 deletions src/common/SDKOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export const nextjs = "Next JS";
export const web = "Web";
export const android = "Android";
export const ios = "iOS";
export const macOS = "macOS";
export const reactnative = "React Native";
export const rnbare = "React Native Bare";
export const rnexpo = "React Native Expo";
Expand Down Expand Up @@ -45,7 +46,7 @@ export const tkeyios = "tKey iOS";
export const tkeyandroid = "tKey Android";
export const singlefactorauth = "SFA Web";
export const singlefactorauthandroid = "SFA Android";
export const singlefactorauthios = "SFA iOS";
export const singlefactorauthios = "SFA Swift";
export const singlefactorauthrn = "SFA React Native";
export const singlefactorauthflutter = "SFA Flutter";
export const corekitnodejs = "SFA Node.js";
Expand All @@ -59,7 +60,7 @@ export const corekitlist = [
{ label: "SFA Web", value: singlefactorauth, platforms: [...weblist] },
{ label: "SFA Node.js", value: corekitnodejs, platforms: [nodejs] },
{ label: "SFA Android", value: singlefactorauthandroid, platforms: [android] },
{ label: "SFA iOS", value: singlefactorauthios, platforms: [ios] },
{ label: "SFA Swift", value: singlefactorauthios, platforms: [ios, macOS] },
{ label: "SFA React Native", value: singlefactorauthrn, platforms: [...rnlist] },
{ label: "SFA Flutter", value: singlefactorauthflutter, platforms: [flutter] },
];
Expand Down
4 changes: 2 additions & 2 deletions src/components/navDropdown/sdk.html
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@ <h2>SFA Android SDK</h2>
</svg>
</span>
<div>
<h2>SFA iOS SDK</h2>
<p>Single Factor Auth, implementing a single key pair flow in iOS App</p>
<h2>SFA Swift SDK</h2>
<p>Single Factor Auth, implementing a single key pair flow in iOS and macOS App</p>
</div>
</a>
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Install Web3Auth
---

Add the Web3Auth SFA iOS SDK to your project
Add the Web3Auth SFA Swift SDK to your project

1. In Xcode, with your app project open, navigate to **File > Add Packages**.

Expand All @@ -15,10 +15,11 @@ Add the Web3Auth SFA iOS SDK to your project
From the `Dependency Rule` dropdown, select `Exact Version` and enter the
[latest version](https://github.com/Web3Auth/single-factor-auth-swift/releases).

1. When finished, Xcode will automatically begin resolving and downloading your dependencies in the background.
1. When finished, Xcode will automatically begin resolving and downloading your dependencies in the
background.

:::tip SDK Reference

- [Installing Web3Auth SFA iOS](/sdk/core-kit/sfa-ios/install).
- [Installing Web3Auth SFA Swift](/sdk/core-kit/sfa-ios/install).

:::

0 comments on commit 4278dc9

Please sign in to comment.