跳过主要内容
返回插件
@capgo/capacitor-persona
教程
@capgo/capacitor-persona

身份验证

使用原生 iOS 和 Android SDK 进行身份验证

指南

关于Persona的教程

使用@capgo/capacitor-intune

Capacitor插件用于Microsoft Intune MAM注册、应用保护策略、应用配置和MSAL身份验证。

安装

bun add @capgo/capacitor-intune
bunx cap sync

此插件暴露的内容

  • acquireToken - 展示Microsoft登录流程并返回访问令牌及帐户元数据。
  • acquireTokenSilent - 从MSAL缓存中获取之前登录用户的令牌。
  • registerAndEnrollAccount - 将之前已验证的帐户注册到Intune并开始注册。
  • loginAndEnrollAccount - 请要求 Intune 验证并为用户注册,而不先要求应用令牌。

示例用途

acquireToken

呈现 Microsoft 登录流程并返回访问令牌及帐户元数据。

import { IntuneMAM } from '@capgo/capacitor-intune';

await IntuneMAM.acquireToken({} as AcquireTokenOptions);

acquireTokenSilent

从 MSAL 缓存中获取之前登录用户的令牌。

import { IntuneMAM } from '@capgo/capacitor-intune';

await IntuneMAM.acquireTokenSilent({} as AcquireTokenSilentOptions);

registerAndEnrollAccount

将之前验证的帐户注册到 Intune 并开始注册。

import { IntuneMAM } from '@capgo/capacitor-intune';

await IntuneMAM.registerAndEnrollAccount({} as RegisterAndEnrollAccountOptions);

loginAndEnrollAccount

请要求 Intune 验证并为用户注册,而不先要求应用令牌。

import { IntuneMAM } from '@capgo/capacitor-intune';

await IntuneMAM.loginAndEnrollAccount();

全局参考

从使用 @capgo/capacitor-intune 中继续。

如果您正在使用 使用 @capgo/capacitor-intune 规划身份验证和帐户流程,连接它与 @capgo/capacitor-intune @capgo/capacitor-intune 的实现细节在 @capgo/capacitor-intune, 开始使用 @__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-intune 的实现细节在 开始使用, @capgo/capacitor-social-login @capgo/capacitor-social-login 的实现细节在 @capgo/capacitor-social-login, @capgo/capacitor-passkey @capgo/capacitor-passkey 的实现细节在 @capgo/capacitor-passkey, 和 @capgo/capacitor-native-biometric @capgo/capacitor-native-biometric 的实现细节在 @capgo/capacitor-native-biometric.