- real fix for #255
- In order to change a setting that relies on a django setting you would need to use,
DjangoSetting.override(v)
. i.e:
# settings.py
from gqlauth.settings_type import DjangoSetting, GqlAuthSettings
GQL_AUTH = GqlAuthSettings( # noqa F405
EMAIL_FROM=DjangoSetting.override("SomeDiffrentEmail@thanInDjango.settings"),
)
- fix issue #255
- Fall back to primitive graphql errors. The error types approach that I gave so much effort for, was yet another case of 'Don't Let the Perfect Be the Enemy of the Good' and introduced more complexity than I thought.
- dependencies updates.
- Removed secondary email support.
- mypy support
- Support for subscriptions, tested with channels integrations.
- new setting
GqlAuthSettings.JWT_TOKEN_FINDER
for finding the token from Info object, useful for integrations that provide custom info object.
-
users
query was removed due to security concerns. If you want it implement it yourself and make sure to use the appropriate auth measures -
SomeField.afield
is removed, and you can use now justSomeField.field
for async/sync. -
decorators are deprecated, and you should use directives from now on.
LOGIN_REQUIRED_FIELDS
andLOGIN_OPTIONAL_FIELDS
are deprecated in favor ofLOGIN_FIELDS
. From now on you should passStrawberryField
instance toLOGIN_FIELDS
and it is absolutely your responsibility what would be optional/required.REGISTER_MUTATION_FIELDS_OPTIONAL
is deprecated in favor ofREGISTER_MUTATION_FIELDS
.UPDATE_MUTATION_FIELDS
,REGISTER_MUTATION_FIELDS
are also takingStrawberryField
instances from now on.
- New features
- serve Captcha over static files. New setting introduced,
CAPTCHA_SAVE_IMAGE: bool = False
.
- serve Captcha over static files. New setting introduced,
-
New features
- Any fields that are in either
UPDATE_MUTATION_FIELDS
,REGISTER_MUTATION_FIELDS
,REGISTER_MUTATION_FIELDS_OPTIONAL
And the pk field of the model. Will be inserted to UserType and will be in user queries. - Doc strings in gqlquth_settings object
- Any fields that are in either
-
Bug fixed
- Issue #45, #42
-
LOGIN_REQUIRED_FIELDS
is now supported,
These fields would be used to authenticate with SD-jwtauthenticate
function. This function will call each of ourAUTHENTICATION_BACKENDS
, And will return the user from one of them unlessPermissionDenied
was raised. -
REGISTER_MUTATION_FIELDS
is now supported,
Fields that will be registered there will be required by Register mutation
-
- Issue #45, #42
-
Development Notes
- Added new marker for pytest,
default_user
this is the user defined in the default settings, And the custom user is insettings_b.py
with no email field.
- Added new marker for pytest,
-
New features
- async support using ASGI, the resolvers are still sync because of django's ORM
-
API changes
- Previously, following the graphene version, we did i.e
token_auth = relay.ObtainJSONWebToken.Field
,
In order to respect pep8 (since it is a function)
and Strawberry style we changed it totoken_auth = relay.ObtainJSONWebToken.field
. - Renamed
Cap.Field
toCaptcha.field
.
- Previously, following the graphene version, we did i.e
-
Deprecations
- Removed setting ASYNC_EMAIL_TASK, (originally this was a celery task).
-
Development Notes
- Major refactoring of how the test work:
- removed all the dicts that was flying around and used dataclasses.
- added async tests for all tests.
- no longer using request factory, now using test client as it emulates more real life environment.
- Major refactoring of how the test work:
- Nothing new, adding
PyJWT<=2.0.0
to requirements
- Emit
user_verified
signal on password reset (thanks to @imsheldon)
- Add passwordless registration (thanks to @joshuachinemezu)
- Add
user_verified
anduser_registered
signals (thanks to @mnieber) - Verify user in password reset mutation (thanks to capaci )
- Add EMAIL_TEMPLATE_VARIABLES setting (thanks to capaci )
- Add CUSTOM_ERROR_TYPE setting (thanks to boolangery )
- Add select_related to UserNode to limit db queries (thanks to maxpeterson)
- Prevents that UserNode is registered globally for the User type (thanks to panosangelopoulos)
- Add request and timestamp to email templates (thanks to yanivtoledano)
- Add template variables to email subjects.
- Replace RemovedInDjango40Warning ugettext with gettext (thanks to ulgens)
- Added
MeQuery
(thanks to pors).
- Renamed from
ErrorType
toExpectedErrorType
, preventing clash with astrawberry.django
type with same name..
- Fixed bug when performing login in
PasswordChangeMixin
(thanks to panosangelopoulos).
- Fixed typo in error code/message for
expired_token
(thanks to yanivtoledano).
- add pk to UserNode.
- release beta.
- return new token and refreshToken on password change.
- allow login on register, returning token and refresh token.
- review error fields in some mutations.
- update apps config.
- nothing new.
- add mutation to remove secondary email.
- user status is created on signal.
- fix typo in setup.
- nothing new.
- fix readme on pypi.
- nothing new.
- minor bug fixes.
- add user status model to track if user is archived, verified and secondary email.
- add new mutations to handle secondary email.
- allow login with secondary email.
- Fix minor bugs.
- Fix minor bugs.
- Rename settings params.
- Fix typo in settings.
- No changes (testing release on Travis).
- Support for Django >= 2.1
- Revoke refresh tokens when archiving user.
- Allow to revoke refresh tokens on password change and reset.
- Better settings api.
- Update setup.py.
- Add initial README file!
- Hello world!