Setting up miniOrange
This document will guide you through the process of integrating your WordPress website with Freja eID's OpenID Connect.
For the purposes of this guide we are using the free version of miniOrange OAuth Client plugin for Wordpress.
1. Install and activate the miniOrange OAuth Client plugin on the plugins page of your WordPress dashboard
2. Open plugin settings using the button on the left sidebar
3. You will see a page where you choose an OAuth/OpenID Connect provider. Scroll down to choose Custom OpenID Connect App
4. The Configure OpenID Connect tab will be shown
5. Fill in the required fields as follows
- Redirect/Callback URL is populated with your website URL (this can be changed in the paid version of the plugin)
- App Name should be Freja eID
- ClientID and Client secret are unique identifiers of Relying Parties that you get from Freja eID when you integrate with our system
- Scope field populate with: openid profile email
- Authorize Endpoint values:
- Authorize Endpoint token values:
6. After populating the required fields, you will see a new button 'Test Configuration'
7. After testing and making sure that the configuration is correct, the following should open in a new window
8. If you were successful, save your configuration
9. When you click on the Attribute/Role Mapping tab, you will be able to see a new tab where you can map user attributes
10. For this purpose we have mapped the username with the email attribute, meaning that the user's email will be used as their username
Other options
Adding the miniOrange widget to widget area
You can add the miniOrange widget on the widget area you want, in Appearance/Widget page of the Wordpress dashboard.
Click on the dropdown icon on the widget and choose the widget area, click Add Widget to save it.
Redirection after login
If you would like to redirect your users after login there are also 2 options:
1. Redirect after each login
Go to the Login Settings tab in MiniOrange settings > Advanced Settings section > Custom Redirect after login URL.
Enter the URL you wish your users to be redirected to there.
Please see below:
2. Redirect after registration (first login) to your service
If you want your users to be redirected to a custom URL after registration only, you need to make changes in the functions.php file of your Wordpress website.
Please refer to the example below, pay special attention to $custom_page_url
add_action('user_register', 'miniorange_registration' , 10, 1); // Function Definition function miniorange_registration( $user_id ) { $custom_page_url = 'https://your-url-goes-here'; wp_redirect( $custom_page_url ); exit; }