• v0.23.0 1f9fcbec58

    0.23.0 Stable

    ashpie released this 2021-01-25 10:56:36 +01:00 | 250 commits to develop since this release

    Resolved issues : https://eternae.ink/arisu/swaf/milestone/2

    Major features

    • Added password authentication and registration
      • Identifier is now either a username (with password) or an email (with magic link)
    • Authentication factors was reworked a bit to prepare for multi-factor authentication (will come in the future) - see AuthMethod interface
    • Added email address management to allow email recovery.
      • A user have a main email which is their contact email
      • When a user doesn't have any email, a warning is displayed (can be turned off via app config)
    • Sessions are now non-persistent by default. The user can choose to make it persistent at login with the new checkbox.
    • RedirectBackComponent is now PreviousUrlComponent and now has two separated functions:
      • getPreviousUrl(): referer header || session saved previous page || null
      • getIntendedUrl(): req.query.redirect_uri?.toString() || null

    Breaking changes

    • Project was renamed to swaf
    • Removed connection parameter from Migration install, rollback and query methods
    • FixUserMainEmailRelation and DropNameFromUsers migrations are deprecated and must be replaced by DummyMigrations
    • Controller.validate was moved to Validator.validate
    • Many classes were moved, please update your imports
    • Validation errors throw 400 instead of 401 (json, text)
    • RedisComponent doesn't use connect-redis anymore and instead implements its own store
    • When using magic links, two new migrations must be performed: AddUsedToMagicLinksMigration, MakeMagicLinksSessionNotUniqueMigration

    Other changes

    • Changed logging format
      • Log IP addresses
    • Added requestId to recognize each log's request
    • Throwing a single ValidationError is now automatically turned into a ValidationBag
    • Throttler jail triggers are now logged
    • Many bug fixes (see commit log)
    • Added a development test app for swaf (not for apps that use swaf (yet))
    • There is now a total of 62 tests
    Downloads