maybe i was not clear, the problem is to how to get back to the client page at the end instead of landing on the page of the server.
I don’t know how to tackle the issue
def callback(%{assigns: %{ueberauth_auth: auth}} = conn, _params) do
user = basic_info(auth)
with(
resource = %User{} <-
get_or_create_user(user),
{:ok, token, _} <-
Guardian.encode_and_sign(
resource,
%{},
key: :user,
permissions: %{user: GPermissions.max()}
)
) do
resource = Accounts.add_categories_from_settings(resource)
unread_uninteracted_invitations_counts =
Notifications.return_unread_uninteracted_invitations_counts(resource)
conn
|> put_status(200)
|> put_view(AuthView)
|> render(
"logged_in.json",
message: "Logged in!",
token: token,
user: resource,
notis: unread_uninteracted_invitations_counts
)
else
_ ->
conn
|> put_status(401)
|> put_view(ErrorView)
|> render("401.json", message: "Failed to authenticate.", errors: nil)
end
end
it is working as expected all, just that is it possible and if yes how to end up back on the client page
deps:
` {:postgrex, "~> 0.14"},
{:ecto, "~> 3.0.9"},
{:comeonin, "~> 5.1"},
{:argon2_elixir, "~> 2.0"},
{:ueberauth, "~> 0.5"},
{:ueberauth_identity, "~> 0.2"},
{:guardian, "~> 1.2"},
{:guardian_db, "~> 2.0"},
{:arc, "~> 0.11"},
{:arc_ecto, "~> 0.11"},
{:trans, "~> 2.0"},
{:hashids, "~> 2.0"},
{:csv, "~> 2.0"},
{:ex_aws, "~> 2.0", override: true},
{:ex_aws_s3, "~> 2.0"},
{:ex_aws_sns, "~> 2.0"},
{:ex_aws_ses, "~> 2.0"},
{:poison, ">= 1.2.0"},
{:jason, "~> 1.1"},
{:hackney, "~> 1.9"},
{:sweet_xml, "~> 0.6"},
{:word_smith, "~> 0.1.0"},
{:timex, "~> 3.4"},
{:ex_phone_number, "~> 0.1"},
{:quantum, "~> 2.3"},
{:gettext, "~> 0.14"},
{:elixir_uuid, "~> 1.2"},
{:ecto_autoslug_field, "~> 1.0"},
{:ueberauth_google, "~> 0.8"},
{:ueberauth_facebook, "~> 0.8"},
{:bypass, "~> 1.0", only: :test}`