Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adonis redirect aren't compatible with remix #68

Open
Bricklou opened this issue Oct 21, 2024 · 1 comment
Open

Adonis redirect aren't compatible with remix #68

Bricklou opened this issue Oct 21, 2024 · 1 comment

Comments

@Bricklou
Copy link

When using the @adonisjs/ally package, you need to use a code like this to redirect the user to the auth provider:

await ally.use('github').redirect()

The problem is that it can't be called from remix loaders, since the way redirections are handled aren't compatibles.
Is there anything possible to fix this?

@jarle
Copy link
Owner

jarle commented Oct 23, 2024

Thanks for reporting. Until support for this is added, it's possible to use this workaround for ally redirects:

  import { redirect } from '@remix-run/node'

  const redirectUrl = await http.ally.use(provider).redirectUrl()
  return redirect(redirectUrl)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants