Skip to content

Commit b719a77

Browse files
committed
[ES-1915] Documentation of prefix and postfix feature config.
Signed-off-by: GurukiranP <talk2gurukiran@gmail.com>
1 parent ee41933 commit b719a77

File tree

7 files changed

+31
-6
lines changed

7 files changed

+31
-6
lines changed

oidc-ui/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,31 @@ Esignet UI contains the following pages:
3434

3535
The initialization of the component on this page is contingent upon the authentication factors received from the oauth-details endpoint. These authentication factors are determined based on the acr_values parameter specified in the authorize request.
3636

37+
Each authentication method, except KBI, allows users to log in using configured multiple ID types such as Mobile Number, NRC ID, VID, and Email, with support for both prefixes and postfix.
38+
39+
- Configuration Details:
40+
The configuration for rendering multiple login IDs is defined in the application-default.properties file of the esignet-service. If mosip.esignet.ui.config.login-id.options is set to an empty string, null, or an empty array, the UI defaults to using VID login as the fallback login ID.
41+
42+
- Configuration Example:
43+
mosip.esignet.ui.config.login-id.options={ \
44+
{ "id": "mobile", "svg": "mobile_icon", "prefixes": [{"label": "IND", "value": "+91", "maxLength": "", "regex": ""}, {"label": "KHM", "value": "+855"}], "postfix": "@phone", "maxLength": "", "regex": "" }, \
45+
{ "id": "nrc", "svg": "nrc_id_icon", "prefixes": "", "postfix": "@NRC", "maxLength": "", "regex": "" }, \
46+
{ "id": "vid", "svg": "vid_icon", "prefixes": "", "postfix": "@ID", "maxLength": "", "regex": "" }, \
47+
{ "id": "email", "svg": "email_icon", "prefixes": "", "postfix": "@email", "maxLength": "", "regex": "" } \
48+
}
49+
50+
- Each ID configured in `mosip.esignet.ui.config.login-id.options` will create a button for the user to select and use as a login ID type.
51+
52+
- To update the language for buttons, input labels, and placeholders, modify the loginOptions object in the i18n bundle files. Ensure that any new ID added to the configuration is consistently defined with the same ID name across the buttons, input labels, and placeholders objects within the i18n bundle files.
53+
54+
- The svg value specified in the configuration must match the name of the SVG icon located in the images folder to ensure proper rendering in the UI.
55+
56+
- The prefix should be either plain text or an array of objects to support multiple prefixes.
57+
For mobile login with multiple prefixes, it is recommended to use the ISO 3166-1 alpha-3 country code as the label in the configuration. This code will be used to display the corresponding country flag in the UI. (Reference: [ISO 3166-1 country codes](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes)).
58+
The postfix should always be a single text value.
59+
60+
- The maxLength and regex properties are optional for prefixes. If specified within a prefix, the values from the prefix will take precedence; otherwise, the outer values will be used. This follows a scope hierarchy where the inner scope takes priority over the outer scope.
61+
3762
The password-based authentication system incorporates a functionality allowing users to initiate a password recovery process through a designated `Forgot Password` hyperlink.
3863

3964
For knowledge based identification, the form schema is defined in the property : 'auth.factor.kbi.field-details'.

oidc-ui/public/locales/ar.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@
284284
"mobile": "أدخل رقم الجوال",
285285
"nrc": "أدخل معرف المجلس النرويجي للاجئين",
286286
"vid": "أدخل فيد",
287-
"email": "أدخل البريد الإلكتروني هنا"
287+
"email": "أدخل معرف البريد الإلكتروني"
288288
}
289289
}
290290
},

oidc-ui/public/locales/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@
284284
"mobile": "Enter Mobile Number",
285285
"nrc": "Enter NRC ID",
286286
"vid": "Enter VID",
287-
"email": "Enter Email Here"
287+
"email": "Enter Email ID"
288288
}
289289
}
290290
},

oidc-ui/public/locales/hi.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@
284284
"mobile": "मोबाइल नंबर दर्ज करें",
285285
"nrc": "एनआरसी आईडी दर्ज करें",
286286
"vid": "वीआईडी ​​दर्ज करें",
287-
"email": "यहां ईमेल दर्ज करें"
287+
"email": "ईमेल आईडी दर्ज करें"
288288
}
289289
}
290290
},

oidc-ui/public/locales/km.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@
284284
"mobile": "បញ្ចូលលេខទូរស័ព្ទ",
285285
"nrc": "បញ្ចូលលេខសម្គាល់ NRC",
286286
"vid": "បញ្ចូល VID",
287-
"email": "បញ្ចូលអ៊ីមែលនៅទីនេះ"
287+
"email": "បញ្ចូលលេខសម្គាល់អ៊ីមែល"
288288
}
289289
}
290290
},

oidc-ui/public/locales/kn.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@
284284
"mobile": "ಮೊಬೈಲ್ ಸಂಖ್ಯೆಯನ್ನು ನಮೂದಿಸಿ",
285285
"nrc": "ಎನ್ಆರ್ಸಿ ಐಡಿ ನಮೂದಿಸಿ",
286286
"vid": "ವಿಐಡಿ ನಮೂದಿಸಿ",
287-
"email": "ಇಲ್ಲಿ ಇಮೇಲ್ ನಮೂದಿಸಿ"
287+
"email": "ಇಮೇಲ್ ಐಡಿ ನಮೂದಿಸಿ"
288288
}
289289
}
290290
},

oidc-ui/public/locales/ta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@
284284
"mobile": "மொபைல் எண்ணை உள்ளிடவும்",
285285
"nrc": "NRC ஐடியை உள்ளிடவும்",
286286
"vid": "VID ஐ உள்ளிடவும்",
287-
"email": "மின்னஞ்சலை இங்கே உள்ளிடவும்"
287+
"email": "மின்னஞ்சல் ஐடியை உள்ளிடவும்"
288288
}
289289
}
290290
},

0 commit comments

Comments
 (0)