Azure AD B2C와의 통합을 단순화하기 위해 사용자 흐름 엔드포인트에 액세스하기 위해 웹 뷰를 내장한 플러터 패키지입니다. 앱 내에서 회원가입, 로그인, 비밀번호 재설정과 같은 원활한 인증 흐름을 직접 지원합니다. 마이크로소프트의 아이덴티티 플랫폼을 사용하는 개발자를 위한 것으로, B2C 정책의 UI 렌더링을 네이티브 웹 뷰를 통해 처리하여 맞춤형 인증 로직의 필요성을 줄입니다. 이 패키지는 가볍고 플러터 앱과 Azure AD B2C 서비스 간의 간단한 다리 역할을 합니다.
사용 사례
Azure AD B2C 로그인 흐름 통합
B2C 정책을 통한 사용자 등록 활성화
비밀번호 재설정 워크플로 지원
모바일 앱에 B2C UI 삽입
사용자 지정 인증 여정 처리
주요 기능
간단한 웹 뷰 통합
B2C 사용자 흐름에 대한 직접 액세스
최소한의 설정 필요
보안 토큰 처리
Microsoft 식별 생태계를 위한 것
적합한 대상
Azure AD B2C를 사용하는 Flutter 앱
보안 인증이 필요한 모바일 앱
B2C 정책에 익숙한 개발자
기업용 앱을 개발하는 팀
최소한의 사용자 정의 인증 코드가 필요한 프로젝트
고려 사항
유효한 Azure AD B2C 구성이 필요합니다
웹 뷰 기반 흐름에 제한됨
내장된 토큰 지속성 없음
외부 B2C 정책 URL에 의존
완전한 네이티브 UI 인증에 적합하지 않음
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
Azure AD B2C Embedded Webview
Azure AD B2C Embedded Webview is a very simple Flutter package that demonstrates how to use the embedded web view to sign in users with Azure AD B2C.
Currently, using Flutter packages - appAuth and flutter_azure_b2c redirects to browser and doesn't provide in-app experience.
This package embeds the web view of the user flow endpoint using flutter_appview and redirects the user as per onRedirect callback method.
📚 Features
Login Button
Webview Interaction
Flutter UI Customization
Dynamic Flutter Layout
Refresh Token
🚀 Getting started
To use the package in your Flutter app, add the following code to your main.dart file:
dependencies:aad_b2c_webview:<latest_version>
🛠️ Usage
Parameters
It is recommended to use env to save the keys securely
You have the flexibility to include optional parameters in order to customize the URL according to your specific requirements. The optionalParameters parameter allows you to pass a list of OptionalParam objects, where each object consists of a key and a value that represent the parameter name and its corresponding value, respectively.
Here's an example of how you can utilize the optionalParameters parameter to add new parameters to the URL:
In the above example, we include two optional parameters: "parameter1" with the value "value1" and "parameter2" with the value "value2". You can include multiple OptionalParam objects within the list to incorporate multiple optional parameters in the URL.
These optional parameters provide you with the ability to customize the behavior of the URL and conveniently transmit additional information as per your needs.
Login Button
To add the easy to use sign in with microsoft button simply use the AADB2CBase.button widget
and a beautiful sign in button appears as shown below.
Configuration
Add the following /android/app/src/main/AndroidManifest.xml inside the tags:
Add it to the redirect URL in the Azure AD B2C project. If you prefer, you can change the redirect URL in our Flutter code to yours (change it in the Azure AD B2C portal too)