Overview

The Twitter Authentication (Oauth2.0 ) module allows end-users of your Mendix app to login via Single Sign-on (SSO) for Web .

Documentation

The Twitter Authentication (Oauth2.0 ) module allows end-users of your Mendix app to login via Single Sign-on (SSO) for Web .

Installation

  • Add this module to your app.

  • Ensure you have added CommunityCommons, NanoflowCommons, and Encryption from the app store as well.

  • Assign your Admin user role the Administrator module role.

  • Enable anonymous users if you haven't already. Assign your Anonymous user role the Anonymous module role.

  • Assign your regular user role(s) to the Users module role.

  • Add the Configuration_Overview page to your responsive navigation profile.

  • Use the snippets starting with " Snip_Login_Web” on the login page on your Anonymous user role home pages.

  • Be sure to set an encryption key in the Encryption module. The constant to set is called EncryptionKey and should be a random value 32 characters long.

Identity Provider Configuration

  • In your identity provider (Twitter). http://surl.li/kohte.

  • Create an application and set up the authentication and change the permission as (Read and write)
  • Type of app
    • Web app, Automated App, or Bot (web-based Mendix apps,)

  • Callback URL: https:///oath/v2/callback

  • You have to apply for Elevated access http://surl.li/kohte Once you get the elevated access You will receive a ClientID and Client Secret, make a note of that If you’re facing any issues while creating a developer account, please follow the link Note : http://surl.li/kohua Twitter integration Configuration

  • Start your app, log in as an admin, and access the Configuration_Overview page

  • Add a new client configuration with the ClientID, Redirect URL, scope, authorization server URL, and token endpoints provided by your Identity provider.Scope(tweet.read tweet.write users.read offline.access),authorization server Url(http://surl.li/kohuu), token endpoint(http://surl.li/kohvi)

  • Update the username as (Clientid) and password as (ClientSecret) in the constant value under the resource folder

Custom User Provisioning

Review the microflow CUSTOM_UserProvisioning. This is where you should go to change the way that users are provisioned in your app. Here you receive the user info from the API. Use that data to find/create and return an Administration—Account object for the user. You can see examples included in the "User Provisioning” Examples folder.

You can revoke the token by performing the logout action under the Logout folder

Screenshots