Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add UI support for Push notification based authentication #7370

Merged
merged 83 commits into from
Jan 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
48d3c4f
Add jsp pages for push based authentication
ZiyamSanthosh Dec 3, 2024
8c97271
Add i18n for push authentication jsp pages
ZiyamSanthosh Dec 3, 2024
520d209
Add UI support for push authentication
ZiyamSanthosh Jan 23, 2025
0434536
Update apps/console/src/public/deployment.config.json
pavinduLakshan Jan 23, 2025
629928a
Update apps/console/src/public/resources/notification-providers/asset…
pavinduLakshan Jan 23, 2025
7da0d2e
Update features/admin.connections.v1/components/authenticators/push/q…
pavinduLakshan Jan 23, 2025
65a17c5
Update features/admin.push-providers.v1/tsconfig.json
pavinduLakshan Jan 23, 2025
493a124
Update features/admin.connections.v1/components/authenticators/push/q…
pavinduLakshan Jan 23, 2025
13aa123
Update features/admin.push-providers.v1/rollup.config.cjs
pavinduLakshan Jan 23, 2025
e6cf62b
Update features/admin.connections.v1/components/authenticators/push/q…
pavinduLakshan Jan 23, 2025
9fd0200
Update features/admin.connections.v1/components/authenticators/push/q…
pavinduLakshan Jan 23, 2025
6cf1ddd
Update modules/i18n/src/translations/en-US/portals/push-providers.ts
pavinduLakshan Jan 23, 2025
ec774cc
Discard changes to apps/console/webpack.config.ts
pavinduLakshan Jan 23, 2025
e7129d5
Update features/admin.connections.v1/components/authenticators/push/q…
pavinduLakshan Jan 23, 2025
04dfbc3
Update features/admin.connections.v1/components/authenticators/push/q…
pavinduLakshan Jan 23, 2025
7bcd49b
Update features/admin.connections.v1/components/authenticators/push/q…
pavinduLakshan Jan 23, 2025
310ae96
Update features/admin.connections.v1/components/authenticators/push/q…
pavinduLakshan Jan 23, 2025
d3c2d49
Update features/admin.connections.v1/resources/assets/images/icons/pu…
pavinduLakshan Jan 23, 2025
9a8127e
Update features/admin.push-providers.v1/components/push-provider-card…
pavinduLakshan Jan 23, 2025
24a8cbd
Update features/admin.connections.v1/components/edit/forms/authentica…
pavinduLakshan Jan 23, 2025
769a38e
Update features/admin.core.v1/configs/app.ts
pavinduLakshan Jan 23, 2025
0da9691
Update features/admin.identity-providers.v1/components/forms/authenti…
pavinduLakshan Jan 23, 2025
e657bcf
Update features/admin.identity-providers.v1/components/forms/authenti…
pavinduLakshan Jan 23, 2025
e432ed0
Conditionally hide authenticator from the connections page
pavinduLakshan Jan 23, 2025
9864d63
Fix syntax issues
pavinduLakshan Jan 23, 2025
5ccd6c3
Update modules/i18n/src/translations/en-US/portals/push-providers.ts
pavinduLakshan Jan 23, 2025
da36c54
Delete unnecessary changelog
pavinduLakshan Jan 23, 2025
7284b57
Update identity-apps-core/apps/authentication-portal/src/main/webapp/…
pavinduLakshan Jan 23, 2025
4dcbb57
Update features/admin.push-providers.v1/api/push-provider.ts
pavinduLakshan Jan 23, 2025
0b87d07
Update features/admin.push-providers.v1/api/push-provider.ts
pavinduLakshan Jan 23, 2025
d72557c
Update features/admin.push-providers.v1/api/push-provider.ts
pavinduLakshan Jan 23, 2025
5d3242e
Update features/admin.push-providers.v1/api/use-create-push-provider.ts
pavinduLakshan Jan 23, 2025
a70b0d1
Update features/admin.core.v1/constants/app-constants.ts
pavinduLakshan Jan 23, 2025
466b271
Fix spelling issues
pavinduLakshan Jan 23, 2025
447d0cb
Update features/admin.push-providers.v1/api/push-provider.ts
pavinduLakshan Jan 23, 2025
7249b91
Remove unused images
pavinduLakshan Jan 24, 2025
ddb5dd7
Add missing i18n for push authentication
pavinduLakshan Jan 24, 2025
2082544
Update modules/theme/src/themes/default/assets/images/icons/push.svg
pavinduLakshan Jan 24, 2025
ac41774
Update modules/theme/src/themes/default/assets/images/icons/push-prov…
pavinduLakshan Jan 24, 2025
d4bb1ad
Update features/admin.push-providers.v1/api/push-provider.ts
pavinduLakshan Jan 24, 2025
df7d62f
Update features/admin.connections.v1/components/edit/forms/authentica…
pavinduLakshan Jan 24, 2025
bc3d2bf
Add capabality to conditionally disable push authenticator and push n…
pavinduLakshan Jan 24, 2025
2aebd2a
Remove unnecessary files
pavinduLakshan Jan 24, 2025
0564b28
Remove unnecessary comment
pavinduLakshan Jan 24, 2025
9e48a7f
Update apps/console/src/extensions/i18n/resources/en-US/extensions.ts
pavinduLakshan Jan 24, 2025
1fb8307
Update apps/console/src/extensions/i18n/resources/en-US/extensions.ts
pavinduLakshan Jan 24, 2025
450cf19
Update apps/console/src/extensions/i18n/resources/en-US/extensions.ts
pavinduLakshan Jan 24, 2025
611e9ad
Update apps/console/src/extensions/i18n/resources/en-US/extensions.ts
pavinduLakshan Jan 24, 2025
b2de0b4
Update modules/react-components/src/components/file-picker/file-picke…
pavinduLakshan Jan 24, 2025
9b6fe91
🦋 Add changeset
pavinduLakshan Jan 24, 2025
e5b50ae
Update lock file
pavinduLakshan Jan 24, 2025
9a076f3
Update apps/console/src/configs/routes.tsx
pavinduLakshan Jan 24, 2025
91ba980
Update features/admin.email-and-sms.v1/pages/email-and-sms.tsx
pavinduLakshan Jan 24, 2025
722611d
Update identity-apps-core/apps/authentication-portal/src/main/webapp/…
pavinduLakshan Jan 24, 2025
c46b39d
Update features/admin.template-core.v1/components/template-dynamic-fo…
pavinduLakshan Jan 24, 2025
0f254c2
Update identity-apps-core/apps/authentication-portal/src/main/webapp/…
pavinduLakshan Jan 24, 2025
9e6674d
Define path for old email and sms page
pavinduLakshan Jan 24, 2025
3098914
Update route active logic
pavinduLakshan Jan 24, 2025
5f2f370
Add new line
pavinduLakshan Jan 24, 2025
1041fcc
Update features/admin.push-providers.v1/models/templates.ts
pavinduLakshan Jan 24, 2025
b0720cd
Remove unnecessary new line
pavinduLakshan Jan 24, 2025
e0bbecf
Add doc comments
pavinduLakshan Jan 24, 2025
54f8479
Remove unnecessary fragment
pavinduLakshan Jan 24, 2025
ac26e3b
Remove unused imports
pavinduLakshan Jan 24, 2025
a1f1170
Address eslint warnings
pavinduLakshan Jan 25, 2025
0feed5d
Remove unnecessary new line
pavinduLakshan Jan 25, 2025
04c2911
Update features/admin.push-providers.v1/pages/push-providers.tsx
pavinduLakshan Jan 25, 2025
2fd9adc
Update modules/i18n/src/translations/en-US/portals/push-providers.ts
pavinduLakshan Jan 25, 2025
7030c9f
Update comments
pavinduLakshan Jan 25, 2025
a9ca4cf
use meaningful component id
pavinduLakshan Jan 25, 2025
bc743c5
Remove unnecessary new lines
pavinduLakshan Jan 25, 2025
f6d9948
Improve i18n
pavinduLakshan Jan 25, 2025
f4c6219
Add doc comments
pavinduLakshan Jan 26, 2025
e686a3a
Remove unused interface
pavinduLakshan Jan 26, 2025
d6cfdc1
Update license header
pavinduLakshan Jan 26, 2025
b3ef508
Update enable number challenge field hint
pavinduLakshan Jan 26, 2025
0661430
Enable push authenticator and push provider UI for local development
pavinduLakshan Jan 26, 2025
f70c0e4
Move form field resolving logic to separate function
pavinduLakshan Jan 26, 2025
980c38f
Remove illustration
pavinduLakshan Jan 26, 2025
d0d9379
Update license header format
pavinduLakshan Jan 26, 2025
906dd9f
Remove unnecessary spaces
pavinduLakshan Jan 26, 2025
c21d395
Add doc comments
pavinduLakshan Jan 26, 2025
96d5c13
Use new feature flag config model
pavinduLakshan Jan 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .changeset/twenty-panthers-deny.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
"@wso2is/admin.push-providers.v1": major
"@wso2is/admin.identity-providers.v1": patch
"@wso2is/admin.email-providers.v1": patch
"@wso2is/admin.email-and-sms.v1": patch
"@wso2is/admin.sms-providers.v1": patch
"@wso2is/admin.template-core.v1": patch
"@wso2is/admin.connections.v1": patch
"@wso2is/react-components": patch
"@wso2is/admin.core.v1": patch
"@wso2is/identity-apps-core": patch
"@wso2is/theme": patch
"@wso2is/console": patch
"@wso2is/form": patch
"@wso2is/i18n": patch
---

Add UI support for Push notification based authentication
1 change: 1 addition & 0 deletions apps/console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
"@wso2is/admin.organization-discovery.v1": "^2.25.110",
"@wso2is/admin.organizations.v1": "^2.26.110",
"@wso2is/admin.private-key-jwt.v1": "^2.25.110",
"@wso2is/admin.push-providers.v1": "^0.0.0",
pavinduLakshan marked this conversation as resolved.
Show resolved Hide resolved
"@wso2is/admin.remote-repository-configuration.v1": "^2.25.110",
"@wso2is/admin.impersonation.v1": "^1.6.110",
"@wso2is/admin.policy-administration.v1": "^1.0.26",
Expand Down
25 changes: 23 additions & 2 deletions apps/console/src/configs/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ import FullScreenLayout from "../layouts/full-screen-layout";
export const getAppViewRoutes = (): RouteInterface[] => {
const legacyMode: LegacyModeInterface = window["AppUtils"]?.getConfig()?.ui?.legacyMode;

const isPushProviderFeatureEnabled: boolean =
window["AppUtils"]?.getConfig()?.ui?.features?.pushProviders?.enabled;

const defaultRoutes: RouteInterface[] = [
{
category: "extensions:manage.sidePanel.categories.userManagement",
Expand Down Expand Up @@ -736,9 +739,11 @@ export const getAppViewRoutes = (): RouteInterface[] => {
exact: true,
icon: { icon: <EnvelopeGearIcon fill="black" className="icon" /> },
id: "notificationChannels",
name: "Email & SMS",
name: isPushProviderFeatureEnabled ? "Notification Channels" : "Email & SMS",
order: 16,
path: `${ AppConstants.getDeveloperViewBasePath() }/email-and-sms`,
path: isPushProviderFeatureEnabled
? AppConstants.getPaths().get("NOTIFICATION_CHANNELS")
: AppConstants.getPaths().get("EMAIL_AND_SMS"),
protected: true,
showOnSidePanel: true
},
Expand Down Expand Up @@ -774,6 +779,22 @@ export const getAppViewRoutes = (): RouteInterface[] => {
protected: true,
showOnSidePanel: false
},
{
category: "extensions:develop.sidePanel.categories.pushProvider",
component: lazy(() =>
import("@wso2is/admin.push-providers.v1/pages/push-providers")
),
exact: true,
icon: {
icon: getSidePanelIcons().push
},
id: "pushProviders",
name: "Push Notification Provider",
order: 18,
path: AppConstants.getPaths().get("PUSH_PROVIDER"),
protected: true,
showOnSidePanel: false
},
{
category: "extensions:manage.sidePanel.categories.AccountManagement",
children: [
Expand Down
23 changes: 23 additions & 0 deletions apps/console/src/extensions/i18n/models/extensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1967,6 +1967,29 @@ export interface Extensions {
};
};
};
pushAuth: {
quickStart: {
addLoginModal: {
heading: string;
subHeading: string;
};
connectApp: {
description: string;
};
heading: string;
subHeading: string;
steps: {
selectApplication: {
content: string;
heading: string;
};
selectPushAuth: {
content: string;
heading: string;
};
};
}
},
facebook: {
quickStart: {
addLoginModal: {
Expand Down
33 changes: 29 additions & 4 deletions apps/console/src/extensions/i18n/resources/en-US/extensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1992,7 +1992,7 @@ export const extensions: Extensions = {
info: "You can customize the email content using <1>Email Templates</1>.",
updateButton: "Update",
sendTestMailButton: "Send Test Email",
goBack: "Go back to Email & SMS",
goBack: "Go back to Notification Providers",
confirmationModal: {
assertionHint: "Please confirm your action.",
content: "If you delete this configuration, the emails will be sent from the Asgardeo Email Address. " +
Expand Down Expand Up @@ -2086,9 +2086,9 @@ export const extensions: Extensions = {
}
},
notificationChannel: {
heading: "SMS / Email Providers",
title: "SMS / Email Providers",
description: "Configure the SMS and Email providers for your organization."
heading: "Notification Channels",
title: "Notification Channels",
description: "Configure the notifiction channels for your organization."
},
identityProviders: {
apple: {
Expand Down Expand Up @@ -2216,6 +2216,31 @@ export const extensions: Extensions = {
}
}
},
pushAuth: {
quickStart: {
addLoginModal: {
heading: "Add Push Authenticator",
subHeading: "Select an application to set up push authentication."
},
connectApp: {
description:
"Add <1>Push Notification</1> to <3>Step 2</3> on the <5>Login Flow" +
"</5> section of your <7>application</7>."
},
heading: "Push Authenticator Set Up Guide",
subHeading: "Follow the instructions to set up Push Authentication in your login flow.",
steps: {
selectApplication: {
content: "Choose the <1>application</1> for which you want to set up Push Authentication.",
heading: "Select Application"
},
selectPushAuth: {
content: "Go to <1>Login Flow</1> tab and click on the <3>Username & Password + Push</3> option from the Multi-factor login section to configure a basic Push Authentication flow.",
heading: "Select <1>Push Authenticator</1> option"
}
}
}
},
facebook: {
quickStart: {
addLoginModal: {
Expand Down
28 changes: 28 additions & 0 deletions apps/console/src/public/deployment.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -1012,6 +1012,34 @@
"update": []
}
},
"pushProviders": {
"disabledFeatures": [],
"enabled": true,
"features": [
{
"feature": "pushProviders",
"flag": ""
},
{
"feature": "pushProviders.templates",
"flag": ""
}
],
"scopes": {
"create": [
"internal_notification_senders_create"
],
"delete": [
"internal_notification_senders_delete"
],
"read": [
"internal_notification_senders_view"
],
"update": [
"internal_notification_senders_update"
]
}
},
"remoteFetchConfig": {
"disabledFeatures": [],
"enabled": false,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 18 additions & 5 deletions features/admin.connections.v1/components/authenticator-grid.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2023-2024, WSO2 LLC. (https://www.wso2.com).
* Copyright (c) 2023-2025, WSO2 LLC. (https://www.wso2.com).
*
* WSO2 LLC. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
Expand Down Expand Up @@ -50,6 +50,7 @@ import React, {
MouseEvent,
ReactElement,
SyntheticEvent,
useEffect,
useState
} from "react";
import { useTranslation } from "react-i18next";
Expand Down Expand Up @@ -157,7 +158,10 @@ export const AuthenticatorGrid: FunctionComponent<AuthenticatorGridPropsInterfac
const dispatch: Dispatch = useDispatch();
const eventPublisher: EventPublisher = EventPublisher.getInstance();
const { UIConfig } = useUIConfig();
const hiddenAuthenticators: string[] = [ ...(UIConfig?.hiddenAuthenticators ?? []) ];
pavinduLakshan marked this conversation as resolved.
Show resolved Hide resolved

const [ displayingAuthenticators, setDisplayingAuthenticators ] = useState<
(ConnectionInterface | AuthenticatorInterface)[]>([]);
const [ showDeleteConfirmationModal, setShowDeleteConfirmationModal ] = useState<boolean>(false);
const [ deletingIDP, setDeletingIDP ] = useState<ConnectionInterface>(undefined);
const [ isDeletionloading, setIsDeletionLoading ] = useState(false);
Expand All @@ -179,6 +183,15 @@ export const AuthenticatorGrid: FunctionComponent<AuthenticatorGridPropsInterfac

const connectionResourcesUrl: string = UIConfig?.connectionResourcesUrl;

useEffect(() => {
const shownAuthenticatorList: (ConnectionInterface | AuthenticatorInterface)[] =
authenticators.filter((authenticator:ConnectionInterface | AuthenticatorInterface) => {
return !hiddenAuthenticators.includes(authenticator.name);
});

setDisplayingAuthenticators(shownAuthenticatorList);
}, [ authenticators ]);

/**
* Redirects to the authenticator edit page when the edit button is clicked.
*
Expand Down Expand Up @@ -448,14 +461,14 @@ export const AuthenticatorGrid: FunctionComponent<AuthenticatorGridPropsInterfac
isLoading={ isLoading }
isPaginating={ false }
isEmpty={
(!authenticators
|| !Array.isArray(authenticators)
|| authenticators.length <= 0)
(!displayingAuthenticators
|| !Array.isArray(displayingAuthenticators)
|| displayingAuthenticators.length <= 0)
}
emptyPlaceholder={ showPlaceholders() }
>
{
authenticators?.map((authenticator: ConnectionInterface
displayingAuthenticators?.map((authenticator: ConnectionInterface
| AuthenticatorInterface, index: number) => {

const authenticatorConfig: AuthenticatorExtensionsConfigInterface = get(
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading