i implemented the sso example for MS Teams: https://github.com/OfficeDev/msteams-tabs-sso-sample-nodejs. Everything works well, but now i dont know how i should use it to Authenticate my Mean Stack app. I thought that i need to store the token somewhere, but this isn't possible because the example opens up an pug file from which i couldn't communicate to the node js backend. So how can i handle this problem? How can i create a Token or something, to tell my app that it could communicate?
1 Answers
0
votes
As per the sample token is getting stored at the local storage and if you want to use it in the Node JS backend then you may try with scripts running in frontend which can help to pass the information to Node JS backend.
You can refer to this sample : Graph Activity Feed
Client side we have authdelegated.js and where we are passing the token in request. In server.js which is node JS file, it is where we receive the same token and exchange it for server side token.