ex_oauth2_provider
ex_oauth2_provider copied to clipboard
Update dependencies
In order to support use of the library in newer elixir projects (and use of dependent libraries such as phoenix_oauth2_provider, update library dependencies to the most recent available versions.
Hat tip to @aaronsakowski who did the actual work. I read and followed his repo changes to create this PR.
Thanks for putting together the PR @fastjames!
Thanks for putting together the PR @fastjames!
Glad to help! I have a branch for https://github.com/danschultzer/phoenix_oauth2_provider that should provide the same updates, ready to PR once this is merged.
@fastjames Hopefully this is helpful - I noticed the migrations rely on the attrs defined in the modules so this PR will cause the migrations to be generated with those columns now as nullable. If you update ExOauthProvider2.Schema.fields macro to filter out the unsupported values like null then it'll be compatible with latest Ecto and migrations will still have the ability to be non-nullable, or support really any of it's API. I just updated my fork (which has tests for the migrations) and ran into this. https://github.com/heroinbob/ex_oauth2_provider/blob/0.8.1/lib/ex_oauth2_provider/schema.ex#L39
Thanks!
@fastjames Hopefully this is helpful - I noticed the migrations rely on the attrs defined in the modules so this PR will cause the migrations to be generated with those columns now as nullable. If you update ExOauthProvider2.Schema.fields macro to filter out the unsupported values like
nullthen it'll be compatible with latest Ecto and migrations will still have the ability to be non-nullable, or support really any of it's API. I just updated my fork (which has tests for the migrations) and ran into this. https://github.com/heroinbob/ex_oauth2_provider/blob/0.8.1/lib/ex_oauth2_provider/schema.ex#L39Thanks!
Yes, that is especially helpful since I am not actively using the library yet (so I don't get feedback from my own use). I have added a commit that implements the filter logic you demonstrated in your fork. Thanks for the pointer!
@fastjames Hopefully this is helpful - I noticed the migrations rely on the attrs defined in the modules so this PR will cause the migrations to be generated with those columns now as nullable. If you update ExOauthProvider2.Schema.fields macro to filter out the unsupported values like
nullthen it'll be compatible with latest Ecto and migrations will still have the ability to be non-nullable, or support really any of it's API. I just updated my fork (which has tests for the migrations) and ran into this. https://github.com/heroinbob/ex_oauth2_provider/blob/0.8.1/lib/ex_oauth2_provider/schema.ex#L39Thanks!
FYI made a PR with just this change: https://github.com/danschultzer/ex_oauth2_provider/pull/98
Thanks for the work @fastjames and @aaronsakowski! I resolved this in a different way in #100 (described why in https://github.com/danschultzer/ex_oauth2_provider/pull/98#issuecomment-1666591731).