GenAuth DocsDocuments
Concepts
User Guide
Development Integration
Metadata
Development Integration
Multi-tenant (beta)
Console Documentation
Multi-tenant Console
Tenant Console
Saas Application Demo
Concepts
User Guide
Development Integration
Metadata
Development Integration
Multi-tenant (beta)
Console Documentation
Multi-tenant Console
Tenant Console
Saas Application Demo
Old version
  • Single Page Web Application

  • Mobile and Client Applications

    • Android

      • Quick Start
      • Hosted Pages
      • Components

      • APIs

      • Social Login

      • Typical Scenarios

        • 退出登录
        • 闪屏界面
        • 凭证管理
        • 个人中心
        • WebView
      • Private Deployment
      • Version History
    • C#

    • Flutter

    • iOS

    • React Native
  • Standard Web Application

  • Framework Integration

  • Others

  1. Development Integration
  2. /
  3. Mobile and Client Applications
  4. /
  5. Android
  6. /
  7. Typical Scenarios
  8. /
  9. WebView

¶ WebView

Update time: 2025-04-11 11:21:15
Edit

使用 Web 方式登录之前,确保完成了 开发准备

此功能要求 Guard 最低版本 1.2.8

¶ 修改启动代码

参考 快速开始

将

AuthFlow.start(this);

替换为

AuthFlow.startWeb(this);

即可

¶ 设置回调

和快速开始的方式完全一致

¶ 设置 Scope

如果需要自定义 Scope,请调用:

AuthFlow flow = AuthFlow.startWeb(this);
// scopes are divided by white space
flow.setScope("openid profile email phone");

Scope 参数定义请参考 这里 (opens new window)

¶ 跳过确权页面

当我们的 App 作为第一方应用提供给用户时,我们可以跳过确认授权页:

AuthFlow flow = AuthFlow.startWeb(this);
// By default, a consent page will be shown to user
// The following line will hide it
flow.setSkipConsent(true);
Previous article: 个人中心 Next article: Private Deployment
  • 修改启动代码
  • 设置回调
  • 设置 Scope
  • 跳过确权页面

User identity management

Integrated third-party login
Customized authentication process

Enterprise internal management

Single sign-on
Multi-factor authentication
Permission management

Developer

Development Documentation
GitHub (opens new window)

Company

official@genauth.ai
16th Floor, Building B, Beichen Century Center, Chaoyang District, Beijing (Total)
Room 406, 4th Floor, Block B, No. 200, Tianfu Fifth Street, High-tech Zone, Chengdu (Branch)

© Beijing Steamory Technology Co., Ltd.