const { UseIdAPI, DataGroup } = require("useid-eservice-sdk");
// or
import { UseIdAPI, DataGroup } from "useid-eservice-sdk";
Create instance with API key received from UseID service:
const useIdAPI = new UseIdAPI(process.env.USEID_API_KEY);
- Start session with UseID backend (call
startSession()
) - Embed widget using
tcTokenUrl
in response of that backend call andUseIdAPI.widgetSrc
- Listen on refresh address endpoint
- Fetch data from UseID backend (call
getIdentity(eIdSessionId: string)
witheIdSessionId
being the query parametersessionId
at the refresh address) - Get the values by calling
get(dataGroup: DataGroup)
on that result- see TR-03110 and DataGroup.ts for more info on data groups
- those need to be defined and fixed beforehand when registering for the UseID service
Everyone is welcome to contribute the development of this project. You can contribute by opening pull request, providing documentation or answering questions or giving feedback. Please always follow the guidelines and our Code of Conduct.
Open a pull request with your changes and it will be reviewed by someone from the team. When you submit a pull request, you declare that you have the right to license your contribution to the DigitalService and the community. By submitting the patch, you agree that your contributions are licensed under the EUPL license.
Please make sure that your changes have been tested before submitting a pull request.