ueberauth/guardian

Permissions when empty list

Lazarus404 opened this issue · 3 comments

Hey guys,

If I add permissions to claims, but the permissions is an empty list, I get an error. For instance:

MyApp.Guardian.Plug.sign_in(user, %{pem: %{default: []}})

This will produce the error:

protocol Enumerable not implemented for 0 of type Integer. This protocol is implemented for the
following type(s): Ecto.Adapters.SQL.Stream, Postgrex.Stream, DBConnection.Stream,
DBConnection.PrepareStream, Timex.Interval, List, Function, GenEvent.Stream, Range,
File.Stream, Stream, MapSet, HashSet, Date.Range, IO.Stream, HashDict, Map

The problem here is that I can't send anything for permissions except something known from my permissions list. This means, I can't have a logged in user without permissions, which is a thing for new users in my app.

Thanks,
Jahred

I think this issue was fixed by this PR #625, but we missing a release

Thanks. I'll try the master branch and will respond if I spot anything :)

This is indeed fixed in master :)