Skip to content

Conversation

@jakmeier
Copy link
Contributor

This allows auth plugins to return the bypass token as a JSON response, rather than in a redirection.

Using a redirect and putting the bypass token in the query parameter works when the browser goes through the login flow using the PeerTube frontend and redirect back to an external frontend afterwards. But for a purely API based access from an external frontend, the redirect does not work.

See https://framagit.org/framasoft/peertube/official-plugins/-/merge_requests/33 for more details on why it does not work and how the proposed change can be used in a plugin.

Description

Related issues

#7181

Has this been tested?

  • 👍 yes, I added tests to the test suite
  • 💭 no, because this PR is a draft and still needs work
  • 🙅 no, because this PR does not update server code
  • 🙋 no, because I need help

This allows auth plugins to return the bypass token as a JSON
response, rather than in a redirection.

Using a redirect and putting the bypass token in the query
parameter works when the browser goes through the login
flow using the PeerTube frontend and redirect back to an
external frontend afterwards. But for a purely API based
access from an external frontend, the redirect does not work.

See https://framagit.org/framasoft/peertube/official-plugins/-/merge_requests/33
for more details on why it does not work and how the
proposed change can be used in a plugin.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants