This app shows Miro's OAuth2.0 flow using the passport library to authenticate users.
passport-oauth-demo.mp4
- Included Features
- Tools and Technologies
- Prerequisites
- Associated Developer Tutorial
- Run the app locally
- Folder Structure
- Contributing
- License
- You have a Miro account.
- You're signed in to Miro.
- Your Miro account has a Developer team.
- Create a new app in Miro
- Your development environment includes Node.js 14.13 or a later version.
- All examples use
npm
as a package manager andnpx
as a package runner.
-
Run
npm install
to install dependencies. -
Go to index.mjs lines 33-34 and add in your apps
clientID
andclientSecret
variables. Save the file with the updated variables. -
Open the app manifest editor by clicking Edit in Manifest.
In the app manifest editor, copy and paste the following yaml code:
# See https://developers.miro.com/docs/app-manifest on how to use this
appName: Node Passport
redirectUris:
- http://localhost:4000/auth/miro/callback
scopes:
- boards:read
- Run
npm start
and your browser should automatically take you to the Miro OAuth page. Once you install the app on a developer team, you should see the API response in your browser. Great job!
.
├── package.json <-- App dependencies that are installed for the project.
└── index.mjs <-- The main Node.js script to run the PassportJS auth flow.
└── app-manifest.yaml <-- Yaml code to configure your Miro App. This is used in App Settings -> Manifest.
└── node_modules <-- Node.js modules that are installed based on dependencies.
If you want to contribute to this example, or any other Miro Open Source project, please review Miro's contributing guide.