To be precise, the operation steps:
1、User Login into Dynamics 365 online,
2、Click on a button to open the web-application ( within an iFrame or something),
3、Login into the web-application using the token from the context of the currently logged in user.
If anyone can provide some sample code or some blog or even a direction which demonstrates the same, it will be of great help!