ZeusWPI / Haldis

Haldis is your friendly neighbourhood servant. He exists so lazy fucks like you and me don't need to keep tabs of who is ordering what from where.
Other
13 stars 15 forks source link

Add working microsoft login flow #186

Closed mcbloch closed 1 year ago

maximdeclercq commented 1 year ago

Dit lijkt precies wel te werken. Is er iets dat nog moet gebeuren buiten de twee requests?

redfast00 commented 1 year ago

@maximdeclercq ik heb je toegang gegeven tot de repo, nu kan je de merge conflict fixen + eventuele changes toepassen (mag op deze branch, ping me maar als je klaar bent)

maximdeclercq commented 1 year ago

Fyi, Microsoft Graph can be explored here

Getting the profile returns the following:

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users/$entity",
    "businessPhones": [],
    "displayName": "Maxim De Clercq",
    "givenName": "Maxim",
    "jobTitle": null,
    "mail": "declercq.maxim@ugent.be",
    "mobilePhone": null,
    "officeLocation": null,
    "preferredLanguage": null,
    "surname": "De Clercq",
    "userPrincipalName": "DeClercq.Maxim@UGent.be",
    "id": "<hidden>"
}

So retrieving the UGent UID from the Graph API is not possible AFAIK. I will remove the code for this.

I'm not sure why Microsoft UUID is being stored. I don't think this has to be stored persistently.

maximdeclercq commented 1 year ago

@redfast00 I can revert the last commit if you find a use for the Microsoft UUID, but right now it looks fine to me.

It might be ideal to test this first with the Zeus OAuth credentials before merging (I do not have any UGent OAuth application to test with right now).