End-user apps in WSO2 Identity Server
| Branch | Build Status | Travis CI Status |
|---|---|---|
| master |
-
Install NodeJS from https://nodejs.org/en/download/.
đź’ˇ
npm7 has some breaking changes to peer dependencies. Hence, go with anpmversion lower than7. -
Install Maven from https://maven.apache.org/download.cgi. * For Maven 3.8 and up, please check the Troubleshoot section.
-
Install JDK 1.8 https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html.
- Download or clone the project source code from https://github.com/wso2/identity-apps
- Run
mvn clean installfrom the command line in the project root directory (where the rootpom.xmlis located).
If you are building product-is, the built identity apps dependencies will install to your local .m2 repository during the build above.
- Then you just need to build WSO2 Identity Server after. (Follow the guide there)
- Execute
wso2server.sh(For unix environment) orwso2server.bat(For windows environment) file from thebindirectory to run the WSO2 Identity Server. - Navigate to
https://localhost:9443/myaccountorhttps://localhost:9443/consolefrom the browser. (Add certificate exception if required)
-
Do only if you skip WSO2 Identity Server build step above: Download the built distribution of WSO2 Identity Server from https://wso2.com/identity-and-access-management/.
-
Add the following code to
repository/conf/deployment.tomlinWSO2 Identity Serverdistribution pack to allow CORS.[cors] allowed_origins = [ "https://localhost:9000", "https://localhost:9001" ] supported_methods = [ "GET", "POST", "HEAD", "OPTIONS", "PUT", "PATCH", "HEAD", "DELETE", "PATCH" ] exposed_headers = [ "Location" ]
-
Add your hostname and port as a trusted FIDO2 origin to the
deployment.tomlfile as given below.[fido.trusted] origins=["https://localhost:9000"]
-
Currently,
Console&My Accountare considered as system applications hence they are readonly by default. So in order to configure theCallback Urlsas specified in step 7, you need to add the following config to thedeployment.tomlfile to override the default behaviour.[system_applications] read_only_apps = []
-
Execute
wso2server.sh(For unix environment) orwso2server.bat(For windows environment) file from thebindirectory to run WSO2 Identity Server. -
Navigate to
https://localhost:9443/carbon/from the browser, and login to the system by entering an admin password.
Hint! Can find out the default password details here: https://docs.wso2.com/display/ADMIN44x/Configuring+the+System+Administrator
-
In the system, navigate to
Service Providers -> Listfrom left side panel. And then go toEditoption in the application that you want to configure in dev mode (ex:MY_ACCOUNT). Then click onInbound Authentication Configuration -> OAuth/OpenID Connect Configuration -> Edit. And then update theCallback Urlfield with below corresponding values.Console
regexp=(https://localhost:9443/console|https://localhost:9443/t/(.*)/console|https://localhost:9443/console/login|https://localhost:9443/t/(.*)/console/login|https://localhost:9001/console|https://localhost:9001/t/(.*)/console|https://localhost:9001/console/login|https://localhost:9001/t/(.*)/console/login)My Account
regexp=(https://localhost:9443/myaccount|https://localhost:9443/t/(.*)/myaccount|https://localhost:9443/myaccount/login|https://localhost:9443/t/(.*)/myaccount/login|https://localhost:9000/myaccount|https://localhost:9000/t/(.*)/myaccount|https://localhost:9000/myaccount/login|https://localhost:9000/t/(.*)/myaccount/login) -
Open cloned or downloaded Identity Apps repo and run the following commands from the command line in the project root directory (where the
package.jsonis located) to build all the packages with dependencies. (Note:- Not necessary if you have already done above identity apps build steps)# `npm run bootstrap` will install npm dependencies and bootstrap lerna modules. npm run bootstrap && npm run build
or
# This will run `npm run bootstrap && npm run build` in the background. npm run build:devNote:-
To build a single package/app, you can use this command:
npx lerna bootstrap --scope <package-name> && npx lerna run --scope <package-name> build.E.g.
npx lerna bootstrap --scope @wso2is/myaccount && npx lerna run --scope @wso2is/myaccount build -
Start the apps in development mode, Execute
cd apps/<app> && npm startcommand. E.g.cd apps/myaccount && npm start. -
Once the app is successfully started, you can access the via the URLs
https://localhost:9000/myaccountorhttps://localhost:9001/console.
Product Unit tests have been implemented using Jest along with React Testing Library and you can run the unit test suites using the following commands.
npm run testnpx lerna run test --scope @wso2is/formsProduct integration tests have been written using Cypress Testing Framework and you can run the test suites using the following command.
npm run test:integrationnpm run test:integration:interactivenpm run test:integration:smokeFor more information regarding the test module, checkout the README in the tests module.
The portals i.e. Console & My Account are configurable using the deployment.toml when they are hosted inside the Identity Server.
Read through our configurations guidelines to learn about the configuration process.
It is possible to deploy the Console and My Account applications on an external server. To do so, the following steps has to be followed in order to build the applications.
Follow the steps in listed here in-order to build the project with maven.
Once the build is complete, execute the following commands in-order to build the Console & My Account applications for external deployment.
Console
npx lerna run build:external --scope @wso2is/consolenpx lerna run build:external:static --scope @wso2is/consoleOnce the build is completed, you can find the build artifacts inside the build folder i.e apps/console/build.
My Account
npx lerna run build:external --scope @wso2is/myaccountnpx lerna run build:external:static --scope @wso2is/myaccountOnce the build is completed, you can find the build artifacts inside the build folder i.e apps/myaccount/build.
You can simply use npm to build the Console and My Account applications for external deployment by just executing the following script.
# From project root
npm run build:external# From project root
npm run build:external:staticThe respective build artifacts could be found inside the build folder. (apps/(myaccount|console)/build)
Go through our connectors guide to learn how to handle connectors in the Identity Server Console.
- If you face any out of memory build failures, make sure that you have set maven options to
set MAVEN_OPTS=-Xmx384M
Go through our contributing guideline to get an understanding about our contribution process and other necessary instructions.
We encourage you to report issues, improvements and feature requests regarding the project through GitHub Issue Tracker.
Important: And please be advised that, security issues must be reported to [email protected], not as GitHub issues, in order to reach proper audience. We strongly advise following the WSO2 Security Vulnerability Reporting Guidelines when reporting the security issues.
Licenses this source under the Apache License, Version 2.0 (LICENSE), You may not use this file except in compliance with the License.