# Identity & Access / Sign In Sign-in patterns for government services with mobile OTP, username/password, and Aadhaar-based authentication options. **Category:** Patterns **Storybook:** https://doc.ux4g.gov.in/web/?path=/story/ux4g-patterns-identity-access-sign-in--column ## Pattern variants - Column: https://doc.ux4g.gov.in/web/?path=/story/ux4g-patterns-identity-access-sign-in--column - Full Screen: https://doc.ux4g.gov.in/web/?path=/story/ux4g-patterns-identity-access-sign-in--full-screen - Card: https://doc.ux4g.gov.in/web/?path=/story/ux4g-patterns-identity-access-sign-in--card ## When to use this pattern Use Identity & Access / Sign In when building citizen-facing flows that match the described government journey. Combine components such as cards, forms, tables, buttons, and status indicators as shown in Storybook. ## Framework setup ### HTML / CDN ```html ``` ### React ```bash npm install ux4g-web-components ``` ```jsx import 'ux4g-web-components/styles.css'; import 'ux4g-web-components/design-system'; ``` ### Angular Update `angular.json`: ```json { "styles": [ "node_modules/ux4g-web-components/styles/ux4g.css", "src/styles.css" ], "scripts": [ "node_modules/ux4g-web-components/dist/runtime/design-system.js" ] } ``` ## Code examples The snippets below are extracted from the Storybook canvas for Identity & Access / Sign In. Each example shows the rendered HTML, the equivalent React JSX, and the Angular template markup. ### 1. Card — Reset Password - Mobile Number HTML: ```html
arrow_back Back to Sign in

Reset Password

Enter your registered mobile number to receive a verification code

``` React: ```jsx import React from 'react'; const IdentityAccessSignInExample1Demo = () => ( <>
arrow_back Back to Sign in

Reset Password

Enter your registered mobile number to receive a verification code

+91
OR
error_outline
Most services use OTP login so you may not need a password.
{/* Footer Branding */}
Powered by -
); export default IdentityAccessSignInExample1Demo; ``` Angular: ```html
arrow_back Back to Sign in

Reset Password

Enter your registered mobile number to receive a verification code

``` ### 2. Card — Reset Password - OTP Entry HTML: ```html
arrow_back Back

Enter OTP

Sent to +91 98765 XXXXX

``` React: ```jsx import React from 'react'; const IdentityAccessSignInExample2Demo = () => ( <>
arrow_back Back

Enter OTP

Sent to +91 98765 XXXXX

Didn't receive OTP? Resend in 00:17
OTP is valid for 10 minutes
{/* Footer Branding */}
Powered by -
); export default IdentityAccessSignInExample2Demo; ``` Angular: ```html
arrow_back Back

Enter OTP

Sent to +91 98765 XXXXX

``` ### 3. Card — Reset Password - Create New Password HTML: ```html
arrow_back Back

Create new password

Your new password must be different from previous used password

``` React: ```jsx import React from 'react'; const IdentityAccessSignInExample3Demo = () => ( <>
arrow_back Back

Create new password

Your new password must be different from previous used password

visibility
visibility
{/* Footer Branding */}
Powered by -
); export default IdentityAccessSignInExample3Demo; ``` Angular: ```html
arrow_back Back

Create new password

Your new password must be different from previous used password

``` ### 4. Card — Success - Password Reset HTML: ```html
done

Password reset successfully

Your password has been changed successfully. Use your new password to log in.

``` React: ```jsx import React from 'react'; const IdentityAccessSignInExample4Demo = () => ( <>
done

Password reset successfully

Your password has been changed successfully. Use your new password to log in.

{/* Footer Branding */}
Powered by -
); export default IdentityAccessSignInExample4Demo; ``` Angular: ```html
done

Password reset successfully

Your password has been changed successfully. Use your new password to log in.

``` ### 5. Card — Account Recovery - Email HTML: ```html
arrow_back Back

Account recovery

Enter your registered email address to recover your account.

``` React: ```jsx import React from 'react'; const IdentityAccessSignInExample5Demo = () => ( <>
arrow_back Back

Account recovery

Enter your registered email address to recover your account.

{/* Footer Branding */}
Powered by -
); export default IdentityAccessSignInExample5Demo; ``` Angular: ```html
arrow_back Back

Account recovery

Enter your registered email address to recover your account.

``` ### 6. Card — Warning - Mobile Number HTML: ```html

Sign in to your account

Access your government services securely

``` React: ```jsx import React from 'react'; const IdentityAccessSignInExample6Demo = () => ( <>
{/* Reusable Component: Navbar Header */}
{/* Centered White Card Form Box */}

Sign in to your account

Access your government services securely

{/* Input container */}
+91
{/* Error Alert Block */}
error
Your status message goes here
Take action Attempt 1 of 5
{/* Actions */}
OR
{/* Bottom Link */}
New user? Register here
{/* Footer Branding */}
Powered by -
); export default IdentityAccessSignInExample6Demo; ``` Angular: ```html

Sign in to your account

Access your government services securely

``` ### 7. Card — Error - Username Not Found HTML: ```html

Sign in to your account

Access your government services securely

``` React: ```jsx import React from 'react'; const IdentityAccessSignInExample7Demo = () => ( <>
{/* Reusable Component: Navbar Header */}
{/* Centered White Card Form Box */}

Sign in to your account

Access your government services securely

{/* Username Input Field */}
{/* Password Input Field */}
{/* Error Alert Block */}
error
Username not found.
Take action Attempt 1 of 5
{/* Actions */}
OR
{/* Bottom Link */}
New user? Register here
{/* Footer Branding */}
Powered by -
); export default IdentityAccessSignInExample7Demo; ``` Angular: ```html

Sign in to your account

Access your government services securely

``` ### 8. Card — OTP Entry - Active Timer HTML: ```html
arrow_back Back

Enter OTP

Sent to +91 98765 XXXXX

``` React: ```jsx import React from 'react'; const IdentityAccessSignInExample8Demo = () => ( <>
{/* Reusable Component: Navbar Header */}
{/* Centered White Card Form Box */}
{/* Back navigation link */} arrow_back Back {/* OTP Verification Header details */}

Enter OTP

Sent to +91 98765 XXXXX

{/* OTP Input Block Component (6 slots, auto-generated by data-ux-otp) */}
Didn't receive OTP? Resend in 00:17
{/* Actions */}
OTP is valid for 10 minutes
{/* Footer Branding */}
Powered by -
); export default IdentityAccessSignInExample8Demo; ``` Angular: ```html
arrow_back Back

Enter OTP

Sent to +91 98765 XXXXX

``` ### 9. Card — Sign In with Aadhaar HTML: ```html
arrow_back Back

Sign in with Aadhaar

Enter your 12-digit Aadhaar number

``` React: ```jsx import React from 'react'; const IdentityAccessSignInExample9Demo = () => ( <>
{/* Reusable Component: Navbar Header */}
{/* Centered White Card Form Box */}
{/* Back navigation link */} arrow_back Back {/* Heading and Subheading for Aadhaar Verification */}

Sign in with Aadhaar

Enter your 12-digit Aadhaar number

{/* Aadhaar Number Input Field */}
{/* Choose Authentication Method selector */}
Choose Authentication Method
{/* Continue action button and Encryption badge/warning */}
lock Your Aadhaar details are encrypted and secure
{/* Footer Branding */}
Powered by -
); export default IdentityAccessSignInExample9Demo; ``` Angular: ```html
arrow_back Back

Sign in with Aadhaar

Enter your 12-digit Aadhaar number

``` ### 10. Card — Success - Signed In HTML: ```html
done

Signed in successfully!

You are being redirected to your service

``` React: ```jsx import React from 'react'; const IdentityAccessSignInExample10Demo = () => ( <>
{/* Reusable Component: Navbar Header */}
{/* Centered White Card Form Box */}
{/* Top spacer for vertical balance of the center success content */}
{/* Success Central Content */}
{/* Success Badge Checkmark */}
done
{/* Success Heading & Subtext */}

Signed in successfully!

You are being redirected to your service

{/* 3-dot Redirect Progress Loader */}
{/* foter branding */}
Powered by -
); export default IdentityAccessSignInExample10Demo; ``` Angular: ```html
done

Signed in successfully!

You are being redirected to your service

``` ### 11. Column — Error - Unregistered Mobile Number HTML: ```html
UX4G Logo

Secure Digital Access to Government Services

Access certificates, documents, and identity verification seamlessly across all government platforms through a unified citizen login.

TRUSTED BY 800M+ Citizens
AVAILABLE SERVICES 5000+ Integrated

Sign in to your account

Access your government services securely

``` React: ```jsx import React from 'react'; const IdentityAccessSignInExample11Demo = () => ( <>
{/* Left Panel (Sidebar - hidden on Mobile) */}
{/* Top section */}
UX4G Logo

Secure Digital Access to Government Services

Access certificates, documents, and identity verification seamlessly across all government platforms through a unified citizen login.

{/* Bottom section */}
TRUSTED BY 800M+ Citizens
AVAILABLE SERVICES 5000+ Integrated
{/* Decorative rings/circles in background */}
{/* Right Panel (Form panel) */}

Sign in to your account

Access your government services securely

{/* Input container */}
+91
{/* Error Alert Block */}
error
Mobile number not registered.
Register here Attempt 1 of 5
{/* Actions */}
OR
{/* Bottom Link */}
New user? Register here
{/* Footer Branding */}
Powered by -
); export default IdentityAccessSignInExample11Demo; ``` Angular: ```html
UX4G Logo

Secure Digital Access to Government Services

Access certificates, documents, and identity verification seamlessly across all government platforms through a unified citizen login.

TRUSTED BY 800M+ Citizens
AVAILABLE SERVICES 5000+ Integrated

Sign in to your account

Access your government services securely

``` ### 12. Column — Error - Username Not Found HTML: ```html
UX4G Logo

Secure Digital Access to Government Services

Access certificates, documents, and identity verification seamlessly across all government platforms through a unified citizen login.

TRUSTED BY 800M+ Citizens
AVAILABLE SERVICES 5000+ Integrated

Sign in to your account

Access your government services securely

``` React: ```jsx import React from 'react'; const IdentityAccessSignInExample12Demo = () => ( <>
{/* Left Panel (Sidebar - hidden on Mobile) */}
{/* Top section */}
UX4G Logo

Secure Digital Access to Government Services

Access certificates, documents, and identity verification seamlessly across all government platforms through a unified citizen login.

{/* Bottom section */}
TRUSTED BY 800M+ Citizens
AVAILABLE SERVICES 5000+ Integrated
{/* Decorative rings/circles in background */}
{/* Right Panel (Form panel) */}

Sign in to your account

Access your government services securely

{/* NEW in this screen: Dual-field Username & Password layout instead of single Mobile Number with prefix */} {/* Username Input Field */}
{/* Password Input Field */}
{/* NEW in this screen: Error Alert Block message "Username not found" and link "Take action" */} {/* Error Alert Block */}
error
Username not found.
Take action Attempt 1 of 5
{/* Reusable: Actions layout with primary and secondary button actions */} {/* Actions */}
OR
{/* Reusable: Bottom registration link & powered branding */} {/* Bottom Link */}
New user? Register here
{/* Footer Branding */}
Powered by -
); export default IdentityAccessSignInExample12Demo; ``` Angular: ```html
UX4G Logo

Secure Digital Access to Government Services

Access certificates, documents, and identity verification seamlessly across all government platforms through a unified citizen login.

TRUSTED BY 800M+ Citizens
AVAILABLE SERVICES 5000+ Integrated

Sign in to your account

Access your government services securely

``` ### 13. Column — OTP Entry - Active Timer HTML: ```html
UX4G Logo

Secure Digital Access to Government Services

Access certificates, documents, and identity verification seamlessly across all government platforms through a unified citizen login.

TRUSTED BY 800M+ Citizens
AVAILABLE SERVICES 5000+ Integrated
arrow_back Back

Enter OTP

Sent to +91 98765 XXXXX

``` React: ```jsx import React from 'react'; const IdentityAccessSignInExample13Demo = () => ( <>
{/* Left Panel (Sidebar - hidden on Mobile) */}
{/* Top section */}
UX4G Logo

Secure Digital Access to Government Services

Access certificates, documents, and identity verification seamlessly across all government platforms through a unified citizen login.

{/* Bottom section */}
TRUSTED BY 800M+ Citizens
AVAILABLE SERVICES 5000+ Integrated
{/* Decorative rings/circles in background */}
{/* Right Panel (Form panel) */}
{/* NEW in this screen: Back navigation link */} arrow_back Back {/* NEW in this screen: OTP Verification Header details */}

Enter OTP

Sent to +91 98765 XXXXX

{/* NEW in this screen: OTP Input Block Component (6 slots, auto-generated by data-ux-otp) */}
Didn't receive OTP? Resend in 00:17
{/* Actions */}
{/* NEW in this screen: Verify OTP submit action */} {/* NEW in this screen: Info metadata message below action button */}
OTP is valid for 10 minutes
{/* Reusable: Bottom DIC Branding footer */}
Powered by -
); export default IdentityAccessSignInExample13Demo; ``` Angular: ```html
UX4G Logo

Secure Digital Access to Government Services

Access certificates, documents, and identity verification seamlessly across all government platforms through a unified citizen login.

TRUSTED BY 800M+ Citizens
AVAILABLE SERVICES 5000+ Integrated
arrow_back Back

Enter OTP

Sent to +91 98765 XXXXX

``` ### 14. Column — Sign In with Aadhaar HTML: ```html
UX4G Logo

Secure Digital Access to Government Services

Access certificates, documents, and identity verification seamlessly across all government platforms through a unified citizen login.

TRUSTED BY 800M+ Citizens
AVAILABLE SERVICES 5000+ Integrated
arrow_back Back

Sign in with Aadhaar

Enter your 12-digit Aadhaar number

``` React: ```jsx import React from 'react'; const IdentityAccessSignInExample14Demo = () => ( <>
{/* Left Panel (Sidebar - hidden on Mobile) */}
{/* Top section */}
UX4G Logo

Secure Digital Access to Government Services

Access certificates, documents, and identity verification seamlessly across all government platforms through a unified citizen login.

{/* Bottom section */}
TRUSTED BY 800M+ Citizens
AVAILABLE SERVICES 5000+ Integrated
{/* Decorative rings/circles in background */}
{/* Right Panel (Form panel) */}
{/* Reusable: Back navigation link */} arrow_back Back {/* NEW in this screen: Heading and Subheading for Aadhaar Verification */}

Sign in with Aadhaar

Enter your 12-digit Aadhaar number

{/* NEW in this screen: Aadhaar Number Input Field */}
{/* NEW in this screen: Choose Authentication Method selector */}
Choose Authentication Method
{/* NEW in this screen: Continue action button and Encryption badge/warning */}
lock Your Aadhaar details are encrypted and secure
{/* Reusable: Bottom DIC Branding footer */} {/* Footer Branding */}
Powered by -
); export default IdentityAccessSignInExample14Demo; ``` Angular: ```html
UX4G Logo

Secure Digital Access to Government Services

Access certificates, documents, and identity verification seamlessly across all government platforms through a unified citizen login.

TRUSTED BY 800M+ Citizens
AVAILABLE SERVICES 5000+ Integrated
arrow_back Back

Sign in with Aadhaar

Enter your 12-digit Aadhaar number

``` ### 15. Column — Success - Signed In HTML: ```html
UX4G Logo

Secure Digital Access to Government Services

Access certificates, documents, and identity verification seamlessly across all government platforms through a unified citizen login.

TRUSTED BY 800M+ Citizens
AVAILABLE SERVICES 5000+ Integrated
done

Signed in successfully!

You are being redirected to your service

``` React: ```jsx import React from 'react'; const IdentityAccessSignInExample15Demo = () => ( <>
{/* Left Panel (Sidebar - hidden on Mobile) */}
{/* Top section */}
UX4G Logo

Secure Digital Access to Government Services

Access certificates, documents, and identity verification seamlessly across all government platforms through a unified citizen login.

{/* Bottom section */}
TRUSTED BY 800M+ Citizens
AVAILABLE SERVICES 5000+ Integrated
{/* Decorative rings/circles in background */}
{/* Right Panel (Form panel) */}
{/* Top spacer for vertical balance of the center success content */}
{/* NEW in this screen: Success Central Content */}
{/* NEW in this screen: Success Badge Checkmark */}
done
{/* NEW in this screen: Success Heading & Subtext */}

Signed in successfully!

You are being redirected to your service

{/* NEW in this screen: 3-dot Redirect Progress Loader */}
{/* Reusable: Bottom DIC Branding footer */}
{/* Footer Branding */}
Powered by -
); export default IdentityAccessSignInExample15Demo; ``` Angular: ```html
UX4G Logo

Secure Digital Access to Government Services

Access certificates, documents, and identity verification seamlessly across all government platforms through a unified citizen login.

TRUSTED BY 800M+ Citizens
AVAILABLE SERVICES 5000+ Integrated
done

Signed in successfully!

You are being redirected to your service

``` ### 16. Full Screen — Error - Unregistered Mobile Number HTML: ```html

Sign in to your account

Access your government services securely

``` React: ```jsx import React from 'react'; const IdentityAccessSignInExample16Demo = () => ( <>
{/* Main Panel (Centered) */}

Sign in to your account

Access your government services securely

{/* Input container */}
+91
{/* Error Alert Block */}
error
Mobile number not registered.
Register here Attempt 1 of 5
{/* Actions */}
OR
{/* Bottom Link */}
New user? Register here
{/* Footer Branding */}
Powered by -
); export default IdentityAccessSignInExample16Demo; ``` Angular: ```html

Sign in to your account

Access your government services securely

``` ### 17. Full Screen — Error - Username Not Found HTML: ```html

Sign in to your account

Access your government services securely

``` React: ```jsx import React from 'react'; const IdentityAccessSignInExample17Demo = () => ( <>
{/* Main Panel (Centered) */}

Sign in to your account

Access your government services securely

{/* Username Input Field */}
{/* Password Input Field */}
{/* Error Alert Block */}
error
Username not found.
Take action Attempt 1 of 5
{/* Actions */}
OR
{/* Bottom Link */}
New user? Register here
{/* Footer Branding */}
Powered by -
); export default IdentityAccessSignInExample17Demo; ``` Angular: ```html

Sign in to your account

Access your government services securely

``` ### 18. Full Screen — OTP Entry - Active Timer HTML: ```html
arrow_back Back

Enter OTP

Sent to +91 98765 XXXXX

``` React: ```jsx import React from 'react'; const IdentityAccessSignInExample18Demo = () => ( <>
{/* Main Panel (Centered) */}
{/* Back navigation link */} arrow_back Back {/* OTP Verification Header details */}

Enter OTP

Sent to +91 98765 XXXXX

{/* OTP Input Block Component (6 slots, auto-generated by data-ux-otp) */}
Didn't receive OTP? Resend in 00:17
{/* Actions */}
OTP is valid for 10 minutes
{/* Footer Branding */}
Powered by -
); export default IdentityAccessSignInExample18Demo; ``` Angular: ```html
arrow_back Back

Enter OTP

Sent to +91 98765 XXXXX

``` ### 19. Full Screen — Sign In with Aadhaar HTML: ```html
arrow_back Back

Sign in with Aadhaar

Enter your 12-digit Aadhaar number

``` React: ```jsx import React from 'react'; const IdentityAccessSignInExample19Demo = () => ( <>
{/* Main Panel (Centered) */}
{/* Back navigation link */} arrow_back Back {/* Heading and Subheading for Aadhaar Verification */}

Sign in with Aadhaar

Enter your 12-digit Aadhaar number

{/* Aadhaar Number Input Field */}
{/* Choose Authentication Method selector */}
Choose Authentication Method
{/* Continue action button and Encryption badge/warning */}
lock Your Aadhaar details are encrypted and secure
{/* Footer Branding */}
Powered by -
); export default IdentityAccessSignInExample19Demo; ``` Angular: ```html
arrow_back Back

Sign in with Aadhaar

Enter your 12-digit Aadhaar number

``` ### 20. Full Screen — Success - Signed In HTML: ```html
done

Signed in successfully!

You are being redirected to your service

``` React: ```jsx import React from 'react'; const IdentityAccessSignInExample20Demo = () => ( <>
{/* Main Panel (Centered) */}
{/* Top spacer for vertical balance of the center success content */}
{/* Success Central Content */}
{/* Success Badge Checkmark */}
done
{/* Success Heading & Subtext */}

Signed in successfully!

You are being redirected to your service

{/* 3-dot Redirect Progress Loader */}
{/* Footer Branding */}
Powered by -
); export default IdentityAccessSignInExample20Demo; ``` Angular: ```html
done

Signed in successfully!

You are being redirected to your service

```