Ankesh,
This forum post discusses how to get Oauth tokens within your Mendix app https://forum.mendix.com/link/questions/95189 It should help you get started on this.
Hope that helps,
Mike
Have a look at the OpenId Connect module in the marketplace. It is easy to use and set up.