ueberauth/guardian

Using key option in sign_in

davidlibrera opened this issue · 3 comments

I'm opening this issue because reading the documentation I wasn't able to figure how to sign_in using different keys.

Here is well documented how to fetch for a specific key.

I've supposed that the correct way for signing in is this way

Guardian.Plug.sign_in(conn, resource, key: :my_key)

but the :key parameter is ignored, using the default key.

I tried reading the code but I didn't find anything that can help.

I'm using guardian 2.0.0

Many thanks

Since Guardian.Plug.sign_in uses Guardian.encode_and_sign, you should check the docs for that function. https://hexdocs.pm/guardian/Guardian.html#encode_and_sign/4
Here you will see that the option to parse in is token_type. I hope this solves your problem

@davidlibrera Did this solve your problem?

Closing due to inactivity