A simple demonstration of sending messages between apps via iframes.
Uses default express generator from express documentation for initial structure.
Core logic can be found in:
parent/public/javascripts/scripts.js
child/public/javascripts/scripts.js
- git clone the repository
- cd into the root of project
npm install
To run the parent and child servers:
npm start
Open a new browser tab at http://127.0.0.1:3000/
- Onload, the parent syncs with child to verify child is ready
- Child sends sync successful to parent.
- Upon clicking the login button, the parent asks the child for authentication.
- Child sets local access token
- Child sends access token to parent.
- Parent sets local access token.
- Parent redirects to child.
- Child checks for authentication.
- Child shows authentication status.