Relay
Please provide this guide to your
What's a Relay ?
The Cryptr
We design this operation to be carried out with as little action as possible.
So we're going to proceed in 2 steps.
Create the
The fallback content to display on prerenderingconfiguration that specifies theThe fallback content to display on prerenderingand where to redirect theThe fallback content to display on prerenderingon itsThe fallback content to display on prerendering.Create the
The fallback content to display on prerenderingrequest, that manages theThe fallback content to display on prerenderingredirection from a current Access Token to the finalThe fallback content to display on prerenderingof theThe fallback content to display on prerendering.
Introducing the Relay flow.
I get the
relay_uri
via an HTTP POST request, which is a tokenized URI to which the user is redirected from theiraccess_token
.The
The fallback content to display on prerenderingvalidates this tokenized URI, then redirects the user to theThe fallback content to display on prerenderingservice (via thepartner_redirect_uri
).The
The fallback content to display on prerenderingarrives on theThe fallback content to display on prerenderingservice with anauthorization_code
, which allows theThe fallback content to display on prerenderingThe fallback content to display on prerenderingto obtain a new dedicatedaccess_token
via HTTP POST request.
1. Relay Configuration
First we need to create a
To do this, you need to know the URL your
Relay creation
- cURL
curl -X POST ${cryptr_service_url}/api/v2/relays \
-d partner_domain='communitiz-app' \
-d partner_redirect_uri='https://communitiz-app.com/welcome'
The
allowed_email_domains
empty. In fact, your partner must allow Manage the Relay
Here are the other possible actions for managing
Update the Relay
This request will help you to update the
- cURL
curl -X PUT ${cryptr_service_url}/api/v2/relays/:relay_id \
-d partner_redirect_uri='https://new-app.communitiz-app.com/welcome'
Delete the Relay
- cURL
curl -X DELETE ${cryptr_service_url}/api/v2/relays/:relay_id
Retrieve the Relay
- cURL
curl "${cryptr_service_url}/api/v2/relays/:relay_id"
You are now able to view the params of your
List the Relays
- cURL
curl "${cryptr_service_url}/api/v2/relays"
Now that our
2. Relay Requests
In this section we'll look at how you can create a
To do this, you need to have a
Relay Request creation
- cURL
curl -X POST ${cryptr_service_url}/api/v2/relays/:relay_id/request \
-d access_token='eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3Mi...'
Once this request has been used, you should obtain a relay_uri
.
Your
What happens after the redirection
The next step will have to be carried out by your
Once your
relay_uri
, they will enter the code
will be used to authenticate the user.Once your partner has performed the necessary actions and if everything is in order, the user authenticated on your side should now also be authenticated on your
To support your
Conclusion
I hope this guide has given you a better understanding of the steps involved in
- The creation of a The fallback content to display on prerenderingwith all the configuration params needed.
- The Relay Request, to request the redirection of your The fallback content to display on prerenderingto yourThe fallback content to display on prerenderingservice.
- What your partner will have to do on their side
To test and ensure the operation of your Relay system, here is a practical tip:
- You can try to perform a Relay request with Users from the Cryptr sandbox.
API endpoint used in this guide
You can read more about