dommilosz / minecraft-auth

29 stars 3 forks source link

appId and appSecret #8

Closed leopoldhub closed 2 years ago

leopoldhub commented 2 years ago

Hello, I just saw that in your example, you need an appId and an appSecret for microsoft login. Did you have an idea of how and where I can found them? thanks

dommilosz commented 2 years ago

So you need to create azure application.

  1. Login to MS Azure (https://portal.azure.com/)
  2. Search for App registrations
  3. Click new registration
  4. Select: Accounts in any organizational directory (Any Azure AD directory - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox
  5. Register.
  6. Now go to the app and go to endpoints enter url: If you have server setup on localhost enter http(s)://localhost:port/endpoint. Note that http is only valid for localhost. If not enter https://httpbin.org/get to later see and copy the code manually to the authentication steps.
  7. Generate your secret: go to Certificates & secrets, new client secret. You can give it longer expiration date in custom. Copy the key, you won't see it anymore.
  8. Application id is in overview - Application (client) ID
  9. Done. Have a great time coding!

More details here: https://wiki.vg/Microsoft_Authentication_Scheme