authentik fork
This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
Find a file
Ken Sternberg dc655c9283
web: clear "blanked" placeholder when present (#15)
- Renames "SearchSelect.ts" to "ak-search-select.ts", the better to reflect that it is a web
  component.
- Moves it into an independent folder named "SearchSelect" so that all existing folders that use it
  don't need any renaming or manipulation.
- Refactors SearchSelect.ts in the following ways:
  - Re-arranges the properties declaration so the seven properties actually used by callers are at
    the top; comments and documents every property.
  - Separates out the `renderItem` and `renderEmptyItem` HTML blocks into their own templates.
  - Separates `renderItem` further into `renderItemWithDescription` and
    `RenderItemWithoutDescription`; prior to this, there were multiple conditionals handling the
    description issue
  - Separates `renderItems` into `renderItemsAsGroups` and `renderItems`; this documents what each
    function does and removes multiple conditionals
  - Isolates the `groupedItems()` logic into a single method, moving the *how* away from the *what*.
  - Replaces the manual styling of `renderMenu()` into a lit-element `styleMap()`.  This makes the
    actual render a lot more readable!
  - Refactors the `value` logic into its own method, as a _getter_.
  - Refactors the ad-hoc handlers for `focus`, `input`, and `blur` into functions on the `render()`
    method itself.
    - Alternatively, I could have put the handlers as methods on the ak-search-select Node itself;
      Lit would automatically bind `this` correctly if referenced through the `@event` syntax.
      Moving them *out* of the `render()` method would require significantly more testing, however,
      as that would change the code flow enough it might have risked the original behavior.  By
      leaving them in the `render()` scope, this guarantees their original behavior -- whether that
      behavior is correct or not.
- FIXES #15
  - Having isolated as much functionality as was possible, it was easy to change the `onFocus()`
    event so that when the user focuses on the `<input>` object, if it's currently populated with
    the empty option and the user specified `isBlankable`, clear it.
  - **Notice**: This creates a new, possibly undesirable behavior; since it's not possible to know
    *why* the input object is currently empty, in the event that it is currently empty as a result
    of this clearing there is no way to know when the "empty option" marker needs to be put back.

This is an incredibly complex bit of code, the sort that really shouldn't be written by application
teams. The behavior is undefined in a number of cases, and although none of those cases are fatal,
some of them are quite annoying. I recommend that we seriously consider adopting a third-party
solution.

Selects (and DataLists) are notoriously difficult to get right on the desktop; they are almost
impossible to get right on mobile. Every responsible implementation of Selects has a
"default-to-native" experience on mobile because, for the most part, the mobile native experience is
excellent -- delta wanting two-line `<option>` blocks and `<optiongroup>`s, both of which we do
want.

This component implements:

- Rendering the `<input>` element and handling its behavior
- Rendering the `<select>` element and handling its behavior
- Mediating between these two components
- Fetching the data for the `<select>` component from the back-end
- Filtering the data via a partial-match search through the `<input>` element
- Distinguishing between hard-affirm and soft-affirm "No choice" options
- Dispatching the `<select>` element via a portal, the better to control rendering.

That's a *lot* of responsibilities! And it makes Storybooking this component non-viable. I recommend
breaking this up further, but I've already spent a lot of time just doing the refactoring and
getting the new behavior as right as possible, so for now I'm just going to submit the clean-up and
come back to this later.
2023-12-21 22:36:56 +01:00
.github root: make test database name configurable (#7591) 2023-12-18 23:00:24 +01:00
.vscode core: fix sources get icon naming (#7674) 2023-11-21 21:38:30 +01:00
authentik lib: fix event creation when deprecated config is detected (#7969) 2023-12-21 22:27:46 +01:00
blueprints events: add ASN Database reader (#7793) 2023-12-20 22:16:50 +01:00
cmd root: bump python deps (django 5) (#7862) 2023-12-18 22:07:59 +01:00
internal release: 2023.10.5 2023-12-21 15:08:13 +01:00
lifecycle scripts: postgres, redis: only listen on localhost (#7849) 2023-12-11 11:08:48 +00:00
locale translate: Updates for file locale/en/LC_MESSAGES/django.po in fr (#7850) 2023-12-11 10:35:19 +00:00
schemas providers: SCIM (#4835) 2023-03-06 19:39:08 +01:00
scripts events: add ASN Database reader (#7793) 2023-12-20 22:16:50 +01:00
tests web: bump the wdio group in /tests/wdio with 4 updates (#7957) 2023-12-21 11:19:51 +01:00
web web: clear "blanked" placeholder when present (#15) 2023-12-21 22:36:56 +01:00
website website/blog: fix logo (#7968) 2023-12-21 20:54:28 +00:00
.bumpversion.cfg release: 2023.10.5 2023-12-21 15:08:13 +01:00
.dockerignore root: don't exclude enterprise from container image (#6956) 2023-09-22 16:22:16 +02:00
.editorconfig website: codespell with custom dictionary and CI (#5062) 2023-03-24 00:24:55 +01:00
.gitignore root: Ignore the vendor folder (#7094) 2023-10-06 17:50:46 +02:00
CODE_OF_CONDUCT.md root: rework and expand security policy 2022-11-28 12:10:53 +01:00
CODEOWNERS web: bump the eslint group in /web with 1 update (#7039) 2023-10-02 19:37:32 +02:00
CONTRIBUTING.md website/developer-docs: move contributing to dev docs index and link contributing file (#5554) 2023-05-09 20:26:55 +02:00
docker-compose.yml release: 2023.10.5 2023-12-21 15:08:13 +01:00
Dockerfile events: add ASN Database reader (#7793) 2023-12-20 22:16:50 +01:00
go.mod core: bump goauthentik.io/api/v3 from 3.2023104.4 to 3.2023104.5 (#7958) 2023-12-21 11:19:40 +01:00
go.sum core: bump goauthentik.io/api/v3 from 3.2023104.4 to 3.2023104.5 (#7958) 2023-12-21 11:19:40 +01:00
ldap.Dockerfile Fix cache related image build issues 2023-12-09 06:07:21 +01:00
LICENSE enterprise: initial license (#5293) 2023-04-19 16:13:45 +02:00
Makefile root: bump python deps (django 5) (#7862) 2023-12-18 22:07:59 +01:00
manage.py root: update deprecation warnings 2022-11-25 11:47:28 +01:00
poetry.lock root: bump python deps (django 5) (#7862) 2023-12-18 22:07:59 +01:00
proxy.Dockerfile Fix cache related image build issues 2023-12-09 06:07:21 +01:00
pyproject.toml lib: fix event creation when deprecated config is detected (#7969) 2023-12-21 22:27:46 +01:00
radius.Dockerfile Fix cache related image build issues 2023-12-09 06:07:21 +01:00
README.md root: remove outdated sponsorship section on readme (#6973) 2023-09-25 16:38:50 +02:00
schema.yml release: 2023.10.5 2023-12-21 15:08:13 +01:00
SECURITY.md root: update security policy to include link to cure53 report (#7853) 2023-12-11 15:26:36 -06:00

authentik logo


Join Discord GitHub Workflow Status GitHub Workflow Status GitHub Workflow Status Code Coverage Docker pulls Latest version

What is authentik?

authentik is an open-source Identity Provider that emphasizes flexibility and versatility. It can be seamlessly integrated into existing environments to support new protocols. authentik is also a great solution for implementing sign-up, recovery, and other similar features in your application, saving you the hassle of dealing with them.

Installation

For small/test setups it is recommended to use Docker Compose; refer to the documentation.

For bigger setups, there is a Helm Chart here. This is documented here.

Screenshots

Light Dark

Development

See Developer Documentation

Security

See SECURITY.md

Adoption and Contributions

Your organization uses authentik? We'd love to add your logo to the readme and our website! Email us @ hello@goauthentik.io or open a GitHub Issue/PR! For more information on how to contribute to authentik, please refer to our CONTRIBUTING.md file.