Twitter Connector

Content Type: Module
Categories:

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

  1. Add this module to your app.
  2. Ensure you have added CommunityCommons, NanoflowCommons, and Encryption from the app store as well.
  3. Assign your Admin user role the Administrator module role.
  4. Enable anonymous users if you haven't already. Assign your Anonymous user role the Anonymous module role.
  5. Assign your regular user role(s) to the Users module role.
  6. Add the Configuration_Overview page to your responsive navigation profile.
  7. Use the snippets starting with " Snip_Login_Web” on the login page on your Anonymous user role home pages.
  8. 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

  1. In your identity provider (Twitter). https://developer.twitter.com/en/portal/dashboard .
  2. Create an application and set up the authentication and change the permission as (Read and write)
  3. Type of app
     Web app, Automated App, or Bot (web-based Mendix apps,)
  4. Callback URL: https:///oath/v2/callback
  5. You have to apply for Elevated access (https://developer.twitter.com/en/portal/products). 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: https://developer.twitter.com/en/docs/twitter-api/getting-started/getting-access-to-the-twitter-api
    Twitter integration Configuration
  6. Start your app, log in as an admin, and access the Configuration_Overview page
  7. 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(https://twitter.com/i/oauth2/authorize), token endpoint(https://api.twitter.com/2/oauth2/token)
  8. 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

Releases

Version: 1.0.0
Framework Version: 9.12.4
Release Notes: The Twitter Authentication (Oauth2.0 ) module allows end-users of your Mendix app to login via Single Sign-on (SSO) for Web . **Installation** 1. Add this module to your app. 2. Ensure you have added CommunityCommons, NanoflowCommons, and Encryption from the app store as well. 3. Assign your Admin user role the Administrator module role. 4. Enable anonymous users if you haven't already. Assign your Anonymous user role the Anonymous module role. 5. Assign your regular user role(s) to the Users module role. 6. Add the Configuration_Overview page to your responsive navigation profile. 7. Use the snippets starting with " Snip_Login_Web” on the login page on your Anonymous user role home pages. 8. 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** 1. In your identity provider (Twitter). https://developer.twitter.com/en/portal/dashboard . 2. Create an application and set up the authentication and change the permission as (Read and write) 3. Type of app  Web app, Automated App, or Bot (web-based Mendix apps,) 4. Callback URL : https:///oath/v2/callback 5. You have to apply for Elevated access (https://developer.twitter.com/en/portal/products). 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: https://developer.twitter.com/en/docs/twitter-api/getting-started/getting-access-to-the-twitter-api Twitter integration Configuration 1. Start your app, log in as an admin, and access the Configuration_Overview page 2. Add a new client configuration with the ClientID, Redirect URL, scope, authorization server URL, and token endpoints provided by your Identity provider. 3. 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