iOS 情节提要入门项目演示使用 AppAuth for iOS 插件进行 OIDC 身份验证
PlusAuth iOS 故事板入门项目
Simple iOS Storyboard XCode 项目演示了使用 PlusAuth 的基本身份验证流程
关于项目
这是一个非常简单的 iOS 情节提要 XCode 项目,演示了基本的身份验证流程,如注册、登录和注销。为简单起见,我们使用适用于 iOS 的 AppAuth 进行身份验证。
先决条件
在运行项目之前,必须先执行以下步骤:
- 在PlusAuth Dashboard上创建一个PlusAuth帐户和一个租户
- 导航到“客户端”选项卡并创建类型的客户端
Native Application
- 转到刚刚创建的客户端的详细信息页面,并将以下字段设置为:
- 重定向 URIS:
com.plusauth.iosexample.plusauth-ios-starter:/oauth2redirect/ios-provider
- 注销后重定向 URIS:
com.plusauth.iosexample.plusauth-ios-starter:/oauth2redirect/ios-provider
最后,记下客户端 ID 和域(例如 https://example.plusauth.com),以便在下一步中进行应用配置。
开始
首先,我们需要为应用程序提供所需的配置值。将文件夹下的文件重命名为 。PlusAuth.example.plist
plusauth-ios-starter
PlusAuth.plist
然后使用客户端 ID 和 PlusAuth 租户名称修改文件中的值。PlusAuth.plist
注意:此方法使用 Swift 包管理器作为依赖关系管理器。
就这样!点击XCode中的“运行”按钮以启动应用程序。
许可证
This project is licensed under the MIT license. See the LICENSE file for more info.
What is PlusAuth
PlusAuth helps individuals, teams, and organizations to implement authorization and authentication systems in a secure, flexible and easy way.
Explore the PlusAuth Website »