fastapi-azure-auth icon indicating copy to clipboard operation
fastapi-azure-auth copied to clipboard

Two authentication method in one App

Open mohsspark829 opened this issue 1 year ago β€’ 5 comments

Thanks:)

mohsspark829 avatar Apr 14 '23 01:04 mohsspark829

Hi Jonas,

I am getting this error in PR fix end of files.........................................................Passed trim trailing whitespace.................................................Failed

  • hook id: trailing-whitespace
  • exit code: 1
  • files were modified by this hook

Fixing docs/docs/multi-tenant/azure_setup.mdx Fixing docs/docs/single-tenant/azure_setup.mdx

Not sure how to fix it. Could you please advise.

Thanks

mohsspark829 avatar Apr 14 '23 01:04 mohsspark829

Thank you πŸš€

EDIT: Edit: ohhh, I see, the pipeline fails. It is because we use pre-commit. If you have pre-commit locally, you can write pre-commit install. Whenever you commit, it will automatically run all the lints and fix these things. The hook failing now, fails because there is missing an empty line at the end of the file (as is standard in Python). If you run pre-commit locally, it would fix it for you, and my answer below would be correct 😁

You can read about pre-commit in the CONTRIBUTING.md file 😊

The files have probably been fixed, but you need to git add them again, since they've changed. pre-commit only runs on staged files (files you've added to the commit), so when you:

  • add a file
  • run pre-commit
    • pre-commit changes a file
  • write git status

You'll see that the change made by pre-commit isn't staged.

As a side note: I'm at the airport, going to PyCon and a little vacation, so it might take a while before I get to review this PR 😊

JonasKs avatar Apr 14 '23 04:04 JonasKs

Thanks alot, no rush at all, Enjoy your vacation and no work please:) I will do it through git command on Monday (Friday night in New Zealand). Today I did it through the github website.

Have a safe trip:)

Cheers Mohsen

On Fri, 14 Apr 2023, 18:51 Rhuan Barreto, @.***> wrote:

@.**** commented on this pull request.

In docs/docs/multi-tenant/azure_setup.mdx https://github.com/Intility/fastapi-azure-auth/pull/128#discussion_r1166361845 :

@@ -3,14 +3,20 @@ title: Azure configuration sidebar_position: 1


-We'll need to create two application registrations for Azure AD authentication to cover both direct API -use and usage from the OpenAPI (swagger) documentation. +We'll need to create two authentication methods for Azure AD authentication to cover both direct API use and usage from the OpenAPI (swagger) documentation. We can achieve this goal in two ways: +

    +
  1. Create two different Azure Apps
  2. +
  3. Create one Azure App with two (an App can have mutile authentication method) authentication methods
  4. ⬇️ Suggested change

    -

  5. Create one Azure App with two (an App can have mutile authentication method) authentication methods
  6. +
  7. Create one Azure App with two (an App can have multiple authentication methods) authentication methods
  8. β€” Reply to this email directly, view it on GitHub https://github.com/Intility/fastapi-azure-auth/pull/128#pullrequestreview-1384721586, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2EOQMOGKFAJNIFXCWAHAQ3XBDXYJANCNFSM6AAAAAAW5ZDEYU . You are receiving this because you authored the thread.Message ID: @.***>

mohsspark829 avatar Apr 14 '23 07:04 mohsspark829

Hey @mohsspark829 😊 I have not forgot about this, but have not found the time. I'll try to get back to you soon.

JonasKs avatar May 19 '23 16:05 JonasKs

Hey Jonas, great to hear from you:) Sure, thanks, if you need any additional materials, please let me know. Have a great weekend.

Cheers Mohsen

On Sat, 20 May 2023, 04:00 Jonas KrΓΌger Svensson, @.***> wrote:

Hey @mohsspark829 https://github.com/mohsspark829 😊 I have not forgot about this, but have not found the time. I'll try to get back to you soon.

β€” Reply to this email directly, view it on GitHub https://github.com/Intility/fastapi-azure-auth/pull/128#issuecomment-1554790821, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2EOQMIKCDQWW3QB5O7ARPLXG6KKXANCNFSM6AAAAAAW5ZDEYU . You are receiving this because you were mentioned.Message ID: @.***>

mohsspark829 avatar May 19 '23 16:05 mohsspark829

I appreciate your PRs, and I'm sorry I have to close them, but the diff between these and main has diverged too much.

JonasKs avatar Jul 12 '24 13:07 JonasKs