Links to the portal
Reasons for links
Using apps, email or SMS messages you can create links to the MIDATA portal.
Here are some reasons for linking to the portal:
- The user shall register a new account
- The user shall agree (or reject) to some consents
- The user shall use a plugin as standalone web application
- The user shall review some terms and conditions
Possible entry URLs
URL | Purpose |
---|---|
/authservice | OAuth2 login and account registration for use by apps |
#/public/service | Login/Register and review,confirm or reject consents, participate to research projects |
#/public/account | Login for account management functions. (Offers account deletion) |
#/public/apps/<appname> | Use MIDATA plugin as web application |
#/portal/registration | Standard registration page for new user accounts |
#/public/terms/<id> | Display terms and conditions |
OAuth Portal - Parameters
URL: baseurl/authservice
These parameters are used for the OAuth process:
Name | Purpose |
---|---|
response_type | required, must be code |
client_id | required, must be the internal name of your app as registered on the developer portal |
redirect_uri | required, callback URL to call after OAuth process has finished. Must be same as registered for your app. |
state | see OAuth spec. |
code_challenge | see OAuth spec. |
code_challenge_method | see OAuth spec. |
device_id | optional, a unique identifier for the client device (min length: 4 characters) |
Additional parameters that control the login process:
Name | Purpose |
---|---|
isnew | Use isnew=true to start add the registration page. Use isnew=never to start at login and hide the registration of new users. |
ro | Use ro=true to make some input fields on registration page readonly. This parameter is ignored if not enough parameters are provided with the URL. At least family, given, country is required, based on configuration more fields might be needed. |
pwl | Use pwl=true to initially show no password field. Password field is shown in second step unless user has no password set. In this case a one time password is requested. Define a mail for one time password in the application settings. See configure application mails |
joincode | Participation code for a linked project that uses ‘Participant may join through application provided code’ as join method. |
project | Code of project that a user needs to join during app login. |
role | Role of user to log in. Possible values are: account-holder , provider , researcher , developer . |
Additional parameters may be used to pre-fill the login or registration form:
Name | Purpose |
---|---|
login | Email address of user. Used as initial value for login form and on registration page. |
given | First name of user. Used as initial value on registration page. |
family | Family name of user. Used as initial value on registration page. |
gender | Gender of user. Used as initial value on registration page. Possible values: FEMALE ,MALE or OTHER |
country | Country code of user. Used as initial value on registration page. (Example value : CH for switzerland ) |
language | Language to be used. Used as initial value on registration page. (Example value : de for german ) |
birthdate | Birthdate of user. Used as initial value on registration page. (Example value : 1973-11-31 ) |
street | Street line of address of user. Used during registration or login if app or project requires address in app definition. (Example value : Examplestreet 1 ) |
city | City of address of user. Used during registration or login if app or project requires address in app definition. (Example value : Biel ) |
zip | Zip code of address of user. Used during registration or login if app or project requires address in app definition. (Example value : 2500 ) |
phone | Regular phone number of user. Used during registration or login if app or project requires telephone number in app definition. (Example value : 03212345 ) |
mobile | Mobile phone number of user. Used during registration or login if app or project requires telephone number in app definition. (Example value : 03212345 ) |
Service Portal - Parameters
URL: baseurl/#/public/service
The “service” frontend URL may be called with up to 6 parameters which are all optional:
- “login” : The login name (email) of the person who should confirm the consent. The parameter is used to prepopulate the login screen. If it is not present the user has to enter it himself.
- “consent” : The id of the consent that the person should confirm. If the parameter is not present the service portal will look for unconfirmed consents in general.
- “project” : A project that the person is invited to. See chapter below for more information about possible values.
- “isnew” : If set to true the account registration page will be shown first instead of the login page.
- “app” : The id of the app that does the call. Might be used for better visual presentation in the future. Currently ignored.
- “callback” : An URL that should opened in the browser once the user is done with the confirmation. (To continue a longer registration process of the calling app) If the callback URL is set to “close” the browser window will be closed at the end. If no callback URL is given the user should do whatever he wants afterwards.
Alternatively the “service” frontend may be called to create a new consent. Use these parameters to specify the consent:
- “authorize” : A practitioner id or team id that should be authorized to access
- “data” : A comma separated list of MIDATA content type groups and/or content types (prefix with “cnt:”)
- “allow-write” : Use true to allow writes and updates or false for read-only access.
Additional parameters may be used to pre-fill the login or registration form:
Name | Purpose |
---|---|
login | Email address of user. Used as initial value for login form and on registration page. |
given | First name of user. Used as initial value on registration page. |
family | Family name of user. Used as initial value on registration page. |
gender | Gender of user. Used as initial value on registration page. Possible values: FEMALE ,MALE or OTHER |
country | Country code of user. Used as initial value on registration page. (Example value : CH for switzerland ) |
language | Language to be used. Used as initial value on registration page. (Example value : de for german ) |
birthdate | Birthdate of user. Used as initial value on registration page. (Example value : 1973-11-31 ) |
ro | Use ro=true to make some input fields on registration page readonly. This parameter is ignored if not enough parameters are provided with the URL. At least family, given, country is required, based on configuration more fields might be needed. |
Service Portal - Project parameter
The “project” parameter of the service portal may be used to invite people to participate to a project. There are different formats for the parameter:
- Project “code” only (
example: baseurl/#/public/service?project=ABCD-EFGH
) - After login the person will be redirected to the project page and may request participation like any other user on the portal. This will work if the project allows the “Participant applies on Midata portal” participation method. - Project “code” and participation code (example:
baseurl/#/public/service?project=ABCD-EFGH|IJKL-MNOP
) - After login the person will be redirected to the project page and may accept the invitation. The person will be assigned to the project group specified by the participation code. This will only work if the project allows the “Participant may join by entering a code” participation method. The “Participant applies on Midata portal” participation method is not required to be active. - A list of project codes and/or project codes and participation codes. (example:
baseurl/#/public/service?project=0123-4567,ABCD-EFGH|IJKL-MNOP
) - The person will be prompted to join multiple projects.
Account management portal - Parameters
URL: baseurl/#/public/account
- with menu bar URL: baseurl/#/portal/account
- without menu bar
The “account” frontend URL may be called with up to 3 parameters which are optional:
- “login” : The login name (email) of the person. The parameter is used to prepopulate the login screen.
- “role” : Role of user to log in. If this parameter is provided there will be no role picklist. Possible values are:
account-holder
,provider
,researcher
,developer
. - “callback” : An URL that should opened in the browser once the user is done.
Plugin as Standalone web application
URL: baseurl/#/public/apps/<pluginname>
Replace <pluginname>
with the internal name of your plugin as registered in the developer portal.
The user may log in or create a new account and will be directed to the specified plugin. The same additional parameters as for the service portal may be used.
If you have uploaded an icon for the plugin it will be used on the login page.
Registration Page - Parameters
URL: baseurl/#/portal/registration
Name | Purpose |
---|---|
email | Email address of user. Used as initial value for login form and on registration page. |
given | First name of user. Used as initial value on registration page. |
family | Family name of user. Used as initial value on registration page. |
gender | Gender of user. Used as initial value on registration page. Possible values: FEMALE ,MALE or OTHER |
country | Country code of user. Used as initial value on registration page. (Example value : CH for switzerland ) |
language | Language to be used. Used as initial value on registration page. (Example value : de for german ) |
ro | Use ro=true to make some input fields on registration page readonly. This parameter is ignored if not enough parameters are provided with the URL. At least family, given, country is required, based on configuration more fields might be needed. |
Terms and Conditions
URL: baseurl/#/public/terms/<id>
Terms and conditions that have been uploaded to the MIDATA platform will be assigned a unique ID. Using the ID the terms and conditions may be linked from the outside.
If the terms and conditions are available in multiple languages the display language may be selected using lang
as URL parameter.
The MIDATA terms and conditions are available at:
https://ch.midata.coop/#/public/terms/midata-terms-of-use
The MIDATA privacy policy is available at: