Skip to content

Add dj-rest-auth - #4187

Merged
SchrodingersGat merged 34 commits into
inventree:masterfrom
matmair:matmair/issue3978
Jun 20, 2023
Merged

SchrodingersGat merged 34 commits into
inventree:masterfrom
matmair:matmair/issue3978

Conversation

@matmair

@matmair matmair commented Jan 9, 2023 •

Copy link
Copy Markdown
Member

This PR:

  • Adds various endpoints to use the currently available auth/registering functions via the API
  • Adds JWT as an auth method (simpler to use in SPA - related to Epic: React #3901)

TODO:

  • test registering endpoint
  • add social connect endpoints
  • security review?
  • extend docs

Fixes #3978

[FR] User registration via API
Fixes inventree#3978
@matmair matmair added api Relates to the API security Relates to a security issue labels Jan 9, 2023
@matmair matmair added this to the 0.10.0 milestone Jan 9, 2023
@matmair matmair self-assigned this Jan 9, 2023
@SchrodingersGat

Copy link
Copy Markdown
Member

Does this work with existing SSO solutions?

@matmair

matmair commented Jan 9, 2023

Copy link
Copy Markdown
Member Author

@SchrodingersGat that is still TODO

@SchrodingersGat SchrodingersGat modified the milestones: 0.10.0, 0.11.0 Feb 2, 2023
@SchrodingersGat SchrodingersGat modified the milestones: 0.11.0, 1.0.0 Apr 12, 2023
@matmair

matmair commented Jun 8, 2023

Copy link
Copy Markdown
Member Author

@SchrodingersGat do we want to continue supporting all social connection options with #3901 or should we cut down the options for the first version?

@SchrodingersGat

Copy link
Copy Markdown
Member

By "cut down" do you mean still supporting key ones (e.g. google / microsoft)?

@matmair

matmair commented Jun 15, 2023 •

Copy link
Copy Markdown
Member Author

@SchrodingersGat it took a bit but it seems like we can maintain support for almost all providers (all that support OAuth2).

Exceptions are (updated 2310 CEST):

Found handler that is not yet ready for platform UI: `draugiem`
Found handler that is not yet ready for platform UI: `evernote`
Found handler that is not yet ready for platform UI: `500px`
Found handler that is not yet ready for platform UI: `flickr`
Found handler that is not yet ready for platform UI: `openstreetmap`
Found handler that is not yet ready for platform UI: `persona`
Found handler that is not yet ready for platform UI: `pocket`
Found handler that is not yet ready for platform UI: `steam`
Found handler that is not yet ready for platform UI: `telegram`
Found handler that is not yet ready for platform UI: `trello`
Found handler that is not yet ready for platform UI: `tumblr`
Found handler that is not yet ready for platform UI: `xing

I will work on adding support for Keycloak, OpenId and Twitter. Are you ok with waiting for FRs for the rest?

@matmair

matmair commented Jun 15, 2023

Copy link
Copy Markdown
Member Author

Ok, I have to revise that; there is a Twitter OAuth2 and OIDC endpoint; I added keycloak so it should be good to go.
The only thing missing is an endpoint to get all available providers and a few small refactors.

@matmair
matmair marked this pull request as ready for review June 15, 2023 23:16
@matmair
matmair requested a review from SchrodingersGat as a code owner June 15, 2023 23:16
@SchrodingersGat

Copy link
Copy Markdown
Member

I will work on adding support for Keycloak, OpenId and Twitter. Are you ok with waiting for FRs for the rest?

Absolutely - I don't think it makes sense to spend a bunch of effort for integrations that may never actually be used.

@SchrodingersGat

Copy link
Copy Markdown
Member

Does this replace our existing SSO login views completely?

@matmair

matmair commented Jun 16, 2023

Copy link
Copy Markdown
Member Author

No, it just exposes them in another way. Under the hood the same functional code is used.

@matmair matmair modified the milestones: 1.0.0, 0.12.0 Jun 20, 2023
@matmair

matmair commented Jun 20, 2023

Copy link
Copy Markdown
Member Author

Closes #3978

@SchrodingersGat

SchrodingersGat commented Jun 20, 2023 •

Copy link
Copy Markdown
Member

@matmair ready for merge? Does this need any additional docs?

@matmair

matmair commented Jun 20, 2023 •

Copy link
Copy Markdown
Member Author

@SchrodingersGat I got it to a point where the settings do not need to change so no new docs needed.

@SchrodingersGat
SchrodingersGat merged commit b700b44 into inventree:master Jun 20, 2023
@SchrodingersGat

Copy link
Copy Markdown
Member

Well, great! Thanks :)

@matmair
matmair deleted the matmair/issue3978 branch June 20, 2023 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Relates to the API security Relates to a security issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FR] User registration via API

2 participants