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

Redirect to webpage when querying payment pointer in browser #3268

Open
golobitch opened this issue Feb 4, 2025 · 1 comment · May be fixed by #3298
Open

Redirect to webpage when querying payment pointer in browser #3268

golobitch opened this issue Feb 4, 2025 · 1 comment · May be fixed by #3298
Assignees

Comments

@golobitch
Copy link
Collaborator

golobitch commented Feb 4, 2025

When querying payment pointer, we are always returning JSON data about that payment pointer.

For example, when entering ilp.dev/007 in URL we get following response:

{
    "id":"https://ilp.interledger.cards/007",
    "publicName":"Tadej Golobic",
    "assetCode":"EUR",
    "assetScale":2,
    "authServer":"https://auth.interledger.cards",
    "resourceServer":"https://ilp.interledger.cards"
}

Idea is, when querying payment pointer through browser (meaning when Accept header is text/html), we should redirect user to a webpage with a 301 status code. This redirect URL should be defined in the environment variables (exactly like it is for idp).

Example wallet address: https://fynbos.me/radu
Example of the page after navigating to wallet address in browser: https://interledger.app/me/fynbos.me/radu

It should be implemented here:

export async function getWalletAddress(

in getWalletAddress we need to check if Content-Type is text/html. If it is, then we need to do redirect to the webpage defined in env.

@golobitch golobitch added the discussions: ideas Convert to an idea discussion label Feb 4, 2025
@github-project-automation github-project-automation bot moved this to Backlog in Rafiki Feb 4, 2025
@mkurapov mkurapov removed the discussions: ideas Convert to an idea discussion label Feb 4, 2025
@mkurapov mkurapov moved this from Backlog to Todo in Rafiki Feb 4, 2025
@mkurapov mkurapov marked this as a duplicate of #3269 Feb 5, 2025
@cozminu cozminu moved this from Todo to In Progress in Rafiki Feb 10, 2025
@cozminu
Copy link
Contributor

cozminu commented Feb 13, 2025

This needs interledger/open-payments#550 to be merged, then updated here on the todo comment to use the newest openapi spec for response validation middleware

@cozminu cozminu moved this from In Progress to Ready for Review in Rafiki Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready for Review
Development

Successfully merging a pull request may close this issue.

3 participants