Heeyy forum! After some contemplation I have realized that doing this on my own is far above my skill level. I need someone that can help me integrate Freja eID’s OpenID auth system for logging in and signing up to my app. As far as I can gather this is what needs to be done:
Initial Setup and Contract
Contact Freja eID:
- Draft and send an email to partnersupport@frejaeid.com expressing your intent to use their OpenID Connect services.
Sign a Contract:
- Review and sign the contract provided by Freja eID to officially start the partnership.
Submit Required Information:
- Gather and send the following details to Freja eID:
- Company name (ensure it is less than 100 characters).
- Company logo in SVG format (ensure the file is less than 1.5MB).
- A brief description of your company and services in both English and Swedish (ensure it is less than 500 characters).
- Your company’s URL.
- The redirect URI for after successful logins.
- The minimum registration level required for transactions (Basic, Extended, Plus).
Obtain Credentials
Receive Client ID and Client Secret:
- Wait to receive the client ID and client secret from Freja eID’s partner support, which are crucial for your application’s authentication requests.
Adalo Custom Component Development
Set Up Development Environment:
- Install Node.js if not already installed.
- Enable developer mode in your Adalo account.
Create a New Adalo Library:
- Open your terminal or command prompt.
- Execute npx create-adalo-component my-freja-eid-login.
- Navigate into your project directory using cd my-freja-eid-login.
Log in and Start Development Server:
- Execute npx adalo login and log in with your credentials.
- Start the development server by executing npx adalo dev.
Coding the Authentication Component
Configure the Manifest File:
- Edit manifest.json to add properties for client ID, client secret, and other necessary details.
Implement Authorization Code Flow:
- Code the authorization flow in index.js:
- Construct the authorization URL with required parameters.
- Handle redirections to capture the authorization code.
- Exchange the authorization code for an access token and ID token.
Set Up User Info Retrieval:
- Implement functionality to retrieve user information either from the ID token or by making a request to the user info endpoint.
Handle Errors and Security:
- Implement error handling for failures in the authentication process.
- Ensure the ID token is validated properly to confirm its integrity and authenticity.
Testing and Deployment
Test in Adalo:
- Use the Adalo preview feature to test the component in a web environment.
- Optionally, use iOS and Android simulators to test mobile compatibility.
Publish Your Component:
- Once testing is satisfactory, run npx adalo publish to publish your component to the Adalo marketplace.
Configure in Adalo Editor:
- Add your new Freja eID login component to an app within the Adalo editor.
- Configure the component by setting the client ID, client secret, and other necessary details in the properties panel.
Launch and Monitor:
- Launch your app with the new Freja eID login component.
- Monitor the login functionality and gather user feedback for any potential improvements.