OAuth2.0 Authentication (access to API)

Is there a good course on implementing OAuth2.0 in Mendix? I need to use OAuth2.0 authentication to get access to an API from Strava.  
3 answers

If you do not require users to sign in to your application using OAuth, I would not use the OAuth modules from the AppStore.


From the Strava documentation, it seems you need to redirect a user to a specific URL, where the user authorizes your application, and then the user is redirected to you application with some additional information. I would try to solve it as follows:

  1. User logs in to your application
  2. User has to provide access to the Strava API: the user clicks on a button
  3. The Mendix app creates the approriate Strava URL and redirects the user there using the URL redirector widget
  4. The user, in Strava, grants your application access,
  5. Strave redirects the user to the URL the Mendix app specified
  6. The user is redirected to a request handler of the Mendix application (which you set up using the DeepLink module)
  7. The Mendix app parses the URL, and extracts all additional information from it (notably the authorization code)
  8. The Mendix app now has enough information to do API calls

Hey guys, I recently picked this little side-project up again. 

Where I’m at right now:

Everything works but I have to do manual actions (copy pasting the authorization code in my mendix app).

I’m trying to configure the deeplink module but nothing happens.


What I need is the following:

When a logged in user clicks on “details”, he will be redirected to the strava-app. In the strava-app he can click “authorize”. When he does, he is redirected back to the mendix application and he gets a “state”, “code” and “scope” assigned via the URL. 
How can I automatically trigger a microflow after strava returns the user back to the mendix app?

I’ve tried the deeplink module but nothing happens. What I did to configure the deeplink module is the following:
→ Project settings: After starup microflow: StartDeeplink
→ Default homepage: DeepLinkHome (microflow)
→ Apply access for admin to configure deeplinks
→ I don’t realy understand what to do next? On the homepage I clicked configure deeplink (this shows the deeplink overview page), then I click “new” and did the following:

  • Name: “Test”
  • Microflow: “getAuthenticationAndScope”
  • I checked the “Seperate GET parameters”  
  • Save

Then when I log in as a user and I follow the authorization process, the microflow is not getting triggered… How do I configure the deeplink? Is it possible locally? My URL isn’t changing at all when I setup a deeplink and then navigate to that page… 

Can someone help me?



Good starting point will be the Open Autthentication module in the appstore. The appstore also contains documentation to help you. https://appstore.home.mendix.com/link/app/1414/