giocolas / backstage-microsoft-auth

Backstage 1.24.0 with Microsoft auth to check wrong SignIn functionality
1 stars 0 forks source link

Few questions about your repo #1

Open twanbeeren opened 4 months ago

twanbeeren commented 4 months ago

I've been trying to get the microsoft auth provider to work for the past week with the new frontend/backend system but no luck yet.

A few questions that you maybe can answer:

My main question I'm trying to understand how and why you implemented the authentication without setting the microsoft provider in your app.config. Is this not necessary?

image

Two more questions

Appreciate the help/collaboration

giocolas commented 4 months ago

Hi @twanbeeren:

I've been trying to get the microsoft auth provider to work for the past week with the new frontend/backend system but no luck yet.

A few questions that you maybe can answer:

My main question I'm trying to understand how and why you implemented the authentication without setting the microsoft provider in your app.config. Is this not necessary?

image

You are right, I forgot to specify that I configured Microsoft auth parameters in my local app-config.local.yaml not included in this repo:

auth:
  environment: development
  providers:
    microsoft:
      development:
        clientId: ${AUTH_MICROSOFT_CLIENT_ID}
        clientSecret: ${AUTH_MICROSOFT_CLIENT_SECRET}
        tenantId: ${AUTH_MICROSOFT_TENANT_ID}

NOTE! Without signin resolvers part because my code implements a custom resolver ;)

Two more questions

  • Did you not only use this custom backend module for setting up the microsoft-auth because you have a custom resolver? Or did you not manage to get this to work. The latter is my issue at the moment.

Custom resolver is implemented in a dedicated plugin (see: plugins/auth-backend-module-custom-signin-resolver folder), if you explore code in module.ts file you can easily verify that authenticator is obtained from @backstage/plugin-auth-backend-module-microsoft-provider and custom resolver is "injected" in "registerProvider" function!

  • Your frontend sign in page looks still like the old system. Refering to these docs. This doesn't cause any issues with passing data from the frontend to the backend?

Yes, I created this repo starting from 1.24 original version. In the meantime a lot of versions has been released ....

Lastly I want to advise you to follow the official guides which have been updated with all the latest news!