Commit Graph
100 Commits
Author SHA1 Message Date
Vlad StanandGitHub db72953310 Login polish (#2180)
* feat: set `samesite="none", secure=True` for `is_lnbits_user_authorized` (required in iframe)
* feat: add icons for User ID actions
* feat: set `samesite="none", secure=True
2023-12-14 15:07:22 +01:00
Vlad StanandGitHub bb918a8523 Login improve UI config (#2171)
* feat: show auth configs on the admin UI
* fix: do not access settings on load
* fix: redirect for click on item (not only on text)
* fix: remove `Display Name`
* fix: do not show `Verify email with` if no auth option is available
* feat: show warning before logout
* feat: i18n of account page
* fix: show account icon for user ID login
* fix: always check `isUserAuthorized`
* fix: update the `disclaimer_dialog` message
* feat: hide user ID by default
* fix: redirect from login page when user authorized
* feat: update logout message
* fix: do not translate company names
2023-12-14 11:34:23 +01:00
c9093715b7 [FEAT] Auth, Login, OAuth, create account with username and password #1653 (#2092)
no more superuser url!
delete cookie on logout
add usr login feature
fix node management
* Cleaned up login form
* CreateUser
* information leak
* cleaner parsing usr from url
* rename decorators
* login secret
* fix: add back `superuser` command
* chore: remove `fastapi_login`
* fix: extract `token` from cookie
* chore: prepare to extract user
* feat: check user
* chore: code clean-up
* feat: happy flow working
* fix: usr only login
* fix: user already logged in
* feat: check user in URL
* fix: verify password at DB level
* fix: do not show `Login` controls if user already logged in
* fix: separate login endpoints
* fix: remove `usr` param
* chore: update error message
* refactor: register method
* feat: logout
* chore: move comments
* fix: remove user auth check from API
* fix: user check unnecessary
* fix: redirect after logout
* chore: remove garbage files
* refactor: simplify constructor call
* fix: hide user icon if not authorized
* refactor: rename auth env vars
* chore: code clean-up
* fix: add types for `python-jose`
* fix: add types for `passlib`
* fix: return type
* feat: set default value for `auth_secret_key` to hash of super user
* fix: default value
* feat: rework login page
* feat: ui polishing
* feat: google auth
* feat: add google auth
* chore: remove `authlib` dependency
* refactor: extract `_handle_sso_login` method
* refactor: convert methods to `properties`
* refactor: rename: `user_api` to `auth_api`
* feat: store user info from SSO
* chore: re-arange the buttons
* feat: conditional rendering of login options
* feat: correctly render buttons
* fix: re-add `Claim Bitcoin` from the main page
* fix: create wallet must send new user
* fix:  no `username-password` auth method
* refactor: rename auth method
* fix: do not force API level UUID4 validation
* feat: add validation for username
* feat: add account page
* feat: update account
* feat: add `has_password` for user
* fix: email not editable
* feat: validate email for existing account
* fix: register check
* feat: reset password
* chore: code clean-up
* feat: handle token expired
* fix: only redirect if `text/html`
* refactor: remove `OAuth2PasswordRequestForm`
* chore: remove `python-multipart` dependency
* fix: handle no headers for exception
* feat: add back button on error screen
* feat: show user profile image
* fix: check account creation permissions
* fix: auth for internal api call
* chore: add some docs
* chore: code clean-up
* fix: rebase stuff
* fix: default value types
* refactor: customize error messages
* fix: move types libs to dev dependencies
* doc: specify the `Authorization callback URL`
* fix: pass missing superuser id in node ui test
* fix: keep usr param on wallet redirect
removing usr param causes an issue if the browser doesnt yet have an access token.
* fix: do not redirect if `wal` query param not present
* fix: add nativeBuildInputs and buildInputs overrides to flake.nix
* bump fastapi-sso to 0.9.0 which fixes some security issues
* refactor: move the `lnbits_admin_extensions` to decorators
* chore: bring package config from `dev`
* chore: re-add dependencies
* chore: re-add cev dependencies
* chore: re-add mypy ignores
* feat: i18n
* refactor: move admin ext check to decorator (fix after rebase)
* fix: label mapping
* fix: re-fetch user after first wallet was created
* fix: unlikely case that `user` is not found
* refactor translations (move '*' to code)
* reorganize deps in pyproject.toml, add comment
* update flake.lock and simplify flake.nix after upstreaming
overrides for fastapi-sso, types-passlib, types-pyasn1, types-python-jose
were upstreamed in https://github.com/nix-community/poetry2nix/pull/1463
* fix: more relaxed email verification (by @prusnak)
* fix: remove `\b` (boundaries) since we re using `fullmatch`
* chore: `make bundle`

---------

Co-authored-by: dni  <office@dnilabs.com>
Co-authored-by: Arc <ben@arc.wales>
Co-authored-by: jackstar12 <jkranawetter05@gmail.com>
Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
2023-12-12 11:38:19 +01:00
Vlad StanandGitHub 3b0024bcf2 fix: redirect for all paths of the extension (not only for /api) (#2120)
* fix: redirect for all paths of the extension (not only for `/api`)
* refactor: rename variable
* fix: corner case for root path
* refactor: rename var
* doc: update comment
* fix: do not redirect for static resources
2023-11-24 21:13:19 +01:00
Vlad StanandGitHub b380108a4f doc: add SUPER_USER field (#2097) 2023-11-13 14:10:53 +02:00
Vlad StanandGitHub 5262f56aaf fix: emit event for nested lnbits-dynamic-fields components (#2053)
* fix: emit event for nested components

* chore: update bundle
2023-10-20 14:14:10 +03:00
Vlad StanandGitHub 1c38b129c0 [BUG] Installation of new extensions via LNBITS_EXTENSIONS_DEFAULT_INSTALL does not select the right version (#2046)
* fix: guard against bad versions (eg: `v0.2-ui-api-updates`)

* fix: use the latest release on auto-install
2023-10-18 14:11:58 +03:00
Vlad StanandGitHub d64e2f42f5 fix: explicitly specify the DB name when migrating (#2039) 2023-10-17 10:56:38 +02:00
Vlad StanandPavol Rusnak 484e1ae78a chore: make bundle 2023-10-11 16:16:41 +02:00
Vlad StanandPavol Rusnak ba6408b944 feat: add lnbits-dynamic-fields 2023-10-11 16:16:41 +02:00
Vlad StanandGitHub 542273a8d9 feat: remove commit version (#1980) 2023-10-02 20:31:06 +01:00
Vlad StanandGitHub 2971b571bc [BUG] Fix bad transation call (#1973)
* fix: `:label="$('xxx')` to :label="$t('xxx')

* chore: commit bundles

* chore: remove extra file
2023-09-27 11:57:02 +03:00
c536df0dae Support custom path for installed extensions (#1940)
* feat: the more you fuck around the more you learn
* feat: backwards compatible static file loading
* refactor: update paths for extension files
* refactor: var renaming
* doc: update `LNBITS_EXTENSIONS_PATH` documentation
* fix: default folder install
* feat: install ext without external path
* doc: `PYTHONPATH` no longer required
* fix: add warnings
* fix: missing path
* refactor: re-order statements
* fix: hardcoded path separator

---------

Co-authored-by: dni  <office@dnilabs.com>
2023-09-25 12:44:29 +02:00
Vlad StanandGitHub 49411e58cc Fix: extension links (#1764)
* fix: open extension link
* fix: do not show `Enable` for admin extensions to non-admin users
2023-06-15 19:06:21 +02:00
Vlad StanandGitHub 8c0e7725de Add option to drop extension db at un-install time or later (#1746)
* chore: remove un-used file
* feat: allow extension DB clean-up
* feat: i18n and bundle update
* chore: code format
* fix: button color
* chore: delete temp file
* chore: fix merge conflicts
* chore: add extra log
* chore: bump CACHE_VERSION to `37`
2023-06-15 16:22:18 +02:00
Vlad StanandGitHub 95281eba8c feat: show extension repo as tooltip for each repo (#1743) 2023-06-15 16:08:24 +02:00
Vlad StanandGitHub af660fec14 fix: ext short description for pre-installed extensions (#1744)
* fix: update `installed_extensions` entry after the ext has been unzipped

* fix: show installedRelease description as fallback
2023-05-26 10:48:40 +01:00
Vlad StanandGitHub 80b803913f feat: print extensions version on install/uninstall/reinstall (#1726) 2023-05-24 11:58:11 +01:00
Vlad StanandGitHub 67d8b67ee5 Create super user account if it does not exist (#1688)
* fix: temp create account for `super_user_id` if missing

* chore: remove dumb import

* refactor: move logic outside `crud`

* feat: add uuid4 conversion

* fix: require valid string in .env file

* fix: update the `settings.super_user` value in case or normalisation for UUID4

* fix: allow long super_user

* chore: code format

* fix: add UI redirect with the normalized user

* fix: normalize `super_user` up one level

* fix: should normalize user in non-ui mode also
2023-05-09 09:22:19 +01:00
Vlad StanandGitHub 132d8a9320 fix: rename bool super_user to is_super_user (#1690) 2023-05-09 09:20:51 +01:00
Vlad Stan 554ad88cbd doc: add comments 2023-04-06 12:32:23 +03:00
Vlad Stan 0d14d2b56e fix: remove admin extensions for non admin users 2023-04-05 19:40:16 +03:00
Vlad Stan d7e7d89e9a fix: mypy 2023-04-05 19:03:14 +03:00
Vlad Stan 1d0fcaa579 feat: show content by accepted type 2023-04-05 18:54:54 +03:00
Vlad Stan af212c820c fix: block access admin extensions to normal users 2023-04-05 17:40:08 +03:00
Vlad Stan 0a74ca3972 fix: use extension code instead on name 2023-04-05 17:39:22 +03:00
Vlad Stan 239f166a14 fix: format relative path 2023-03-20 16:07:20 +02:00
Vlad Stan e1e34def8c fix: correct method names for Path 2023-03-20 16:07:20 +02:00
Vlad StanandGitHub fbe982af36 fix: assume no pre-installed extensions (#1558)
* fix: assume no pre-installed extensions

* chore: code format
2023-03-15 11:26:07 +01:00
Vlad StanandGitHub f9695c0569 fix: init filteredExtensions with [] (#1543) 2023-02-23 16:32:40 +01:00
Vlad StanandGitHub 12014ee3e3 fix: hide Admin UI if LNBITS_ADMIN_UI is false (#1537)
* fix: hide Admin config if `LNBITS_ADMIN_UI` is `false`

* chore: code format

* chore: code format
2023-02-22 13:30:57 +01:00
Vlad StanandGitHub 0d5fef1cb9 Add redirect paths for extensions (#1532)
* feat: basic redirect to extension endpoint

* feat: filter by headers

* refactor: extract `middleware.py`

* fix: do not add twice the same extension to redirects

* chore: code clean-up
2023-02-22 10:12:16 +01:00
Vlad StanandGitHub 16a997663d fix: activate default installed extensions (#1533) 2023-02-22 09:43:17 +01:00
Vlad Stan 1cd5c26392 doc: add dependencies field 2023-02-22 10:15:02 +02:00
Vlad Stan 4345361847 chore: code clean-up 2023-02-16 10:48:27 +02:00
Vlad Stan 61fb44a04e feat: add default extension install (LNBITS_EXTENSIONS_DEFAULT_INSTALL) 2023-02-16 10:48:12 +02:00
Vlad Stan d32ad082c7 chore: fix typos 2023-02-15 17:32:49 +02:00
Vlad Stan 7ef4c18b56 doc: update coments 2023-02-15 17:31:10 +02:00
Vlad Stan ca28420e48 chore: code format 2023-02-15 17:26:08 +02:00
Vlad Stan e3ac700005 fix: extension DELETE call 2023-02-15 17:25:58 +02:00
Vlad Stan 6540cd9d76 feat: add endpoint to stop background tasks 2023-02-15 15:45:28 +02:00
Vlad Stan 6a5afe3025 feat: stop extension background work on uninstall or upgrade 2023-02-15 15:34:09 +02:00
Vlad Stan 6276a7a4db fix: icon missing after extension install 2023-01-26 12:30:42 +02:00
Vlad Stan 4af80858bc feat: add page titles 2023-01-25 15:49:50 +02:00
Vlad Stan 41a0a2d66e fix: icon size on mobile 2023-01-25 15:37:28 +02:00
Vlad Stan 00c02e3c85 fix: tabs on mobile 2023-01-25 15:28:06 +02:00
Vlad Stan 8ab4cb8c08 fix: restore installed extensions 2023-01-25 15:00:39 +02:00
Vlad Stan 46faa62b8b fix: upgrade vs install 2023-01-25 14:32:41 +02:00
Vlad Stan a242a823fc fix: do not propagate technical message to the user 2023-01-25 12:46:45 +02:00
Vlad Stan 1373b88169 fix: stars look&feel 2023-01-25 11:48:57 +02:00
Vlad Stan 9c105e8885 chore: code format 2023-01-25 11:19:11 +02:00
Vlad Stan f27e5af639 feat: add tabs to install all/featured/installed 2023-01-25 11:15:56 +02:00
Vlad Stan b016804a5b fix: change star color 2023-01-25 10:05:30 +02:00
Vlad Stan dd3fc7c2bb fix: merge errors 2023-01-25 09:56:05 +02:00
Vlad StanandGitHub 9cca87f738 Merge branch 'main' into extension_install_02 2023-01-25 09:50:54 +02:00
Vlad StanandGitHub 331c8e593b fix: ignore extra settings fields (#1398)
* fix: ignore extra settings fields

* fix: format
2023-01-23 14:25:54 +01:00
Vlad Stan 8971fb5f00 feat: add default value for lnbits_extensions_manifests 2023-01-23 14:58:32 +02:00
Vlad Stan 5ae1a22989 fix: order of declarations 2023-01-23 12:08:44 +02:00
Vlad Stan 567c636b1d refactor: re-order classes 2023-01-23 12:00:09 +02:00
Vlad Stan 39add25b3b refactor use pydantic 2023-01-23 11:52:15 +02:00
Vlad Stan b57e808198 chore: add extra log 2023-01-23 11:51:53 +02:00
Vlad Stan 6b678186a2 chore: remove bad file 2023-01-20 18:44:19 +02:00
Vlad Stan ca1dcd6768 chore: comment typos 2023-01-20 18:26:58 +02:00
Vlad Stan 0b3324cd8f refactor: create TransientSettings for settings that are not to be persisted 2023-01-20 18:10:29 +02:00
Vlad Stan 2dff48dcd0 chore: fix comment 2023-01-20 18:01:05 +02:00
Vlad Stan 5212320d8d refactor: simplify if+for 2023-01-20 18:00:50 +02:00
Vlad Stan e95c6ec3a6 chore: add docs to InstalledExtensionMiddleware class 2023-01-20 17:58:56 +02:00
Vlad Stan b069fe17d8 chore: add comments for register_new_ext_routes 2023-01-20 17:48:52 +02:00
Vlad Stan 4530400d33 chore: add types to method params 2023-01-20 17:08:44 +02:00
Vlad Stan f75529e1c2 fix: double assignment 2023-01-20 16:11:51 +02:00
Vlad Stan 53a95ccc11 refactor: search in list 2023-01-20 16:11:21 +02:00
Vlad Stan 5b6e11a621 fix: import 2023-01-20 16:10:47 +02:00
Vlad Stan fa5d824eea refactor: remove redundant changes 2023-01-20 15:59:44 +02:00
Vlad Stan ea31e148ae refactor: simplify download & extract logic 2023-01-20 15:55:58 +02:00
Vlad Stan 9cf587a64a chore: format SQL 2023-01-20 15:53:27 +02:00
Vlad Stan 8857cb94b4 feat: move GitHub stars inside the repos list 2023-01-20 15:52:27 +02:00
Vlad Stan cf4c9baeeb feat: make page more similar with the extensions page 2023-01-20 15:08:48 +02:00
Vlad Stan 223e92f9e2 fix: make layout similar with extensions page 2023-01-20 14:41:37 +02:00
Vlad Stan a2284da4c3 feat: use Add Extension menu item 2023-01-20 14:33:45 +02:00
Vlad StanandGitHub 30d23c2bef doc: fix release view 2023-01-20 11:46:17 +02:00
Vlad Stan 177d17ec10 chore: remove log statemet 2023-01-20 11:32:39 +02:00
Vlad Stan 43298dfcc7 Merge branch 'extension_install_02' of https://github.com/lnbits/lnbits into extension_install_02 2023-01-20 10:48:28 +02:00
Vlad StanandGitHub 77312d5e3c doc: update Uninstall section 2023-01-20 10:47:47 +02:00
Vlad StanandGitHub 12790dec5d doc: start Unistall Extension section 2023-01-20 10:42:14 +02:00
Vlad StanandGitHub c2ca9403e4 doc: add note 2023-01-20 10:38:38 +02:00
Vlad StanandGitHub e12211e4c5 doc: install dialog 2023-01-20 10:21:19 +02:00
Vlad Stan 9a002a2342 Merge branch 'extension_install_02' of https://github.com/lnbits/lnbits into extension_install_02 2023-01-20 10:06:42 +02:00
Vlad Stan 730017ed62 fix: import after renaming 2023-01-20 10:06:32 +02:00
Vlad StanandGitHub 0b0efd99c1 doc: minor changes 2023-01-20 10:03:56 +02:00
Vlad Stan 776acdd857 fix: typo in file name 2023-01-20 10:00:09 +02:00
Vlad Stan 478d74efc8 fix: separate lnbits_deactivated_extensions from lnbits_disabled_extensions` 2023-01-20 09:39:27 +02:00
Vlad StanandGitHub dea63ca2db doc: add repo extension field details 2023-01-19 18:57:29 +02:00
Vlad StanandGitHub 37ec55a6e4 doc: add github repo example 2023-01-19 18:49:34 +02:00
Vlad StanandGitHub d8ba9448a2 doc: collapse Fields Detailed Description table 2023-01-19 18:45:17 +02:00
Vlad StanandGitHub c22b2b7dfc doc: add Explicit Relase field description 2023-01-19 18:42:32 +02:00
Vlad StanandGitHub 17888ebb49 doc: add config repo steps 2023-01-19 18:17:23 +02:00
Vlad StanandGitHub 496020e47a Create extension-install.md 2023-01-19 18:04:20 +02:00
Vlad Stan 1fb4c1a3b6 fix: icon on deactivate 2023-01-19 16:44:36 +02:00
Vlad Stan 0a7a589935 fix: call load_disabled_extension_list 2023-01-19 15:49:43 +02:00
Vlad Stan bb32112169 fix: icon_url 2023-01-19 14:47:59 +02:00