Build with Sync.
Let people sign in to your app with their Sync account, and put your code online with its own link.
Sync Auth
Add a Continue With Sync button to your app. You ask for what you need, they see the list and approve it, and you never touch their password.
Your app wants to connect to your Sync account
From button to signed in
Create your app
Use the developer portal. Give it a name, your domain and a logo, then save the secret it shows you once.
Send people to the link above
When they approve, they come back to your site with a code in the address.
Swap the code on your server
POST https://auth.sync-ai.app/oauth/token { "grant_type": "authorization_code", "code": "THE_CODE", "client_secret": "YOUR_SECRET", "redirect_uri": "https://example.com/callback" }Read who they are
GET https://auth.sync-ai.app/api/userinfo Authorization: Bearer THE_ACCESS_TOKEN { "sub": "k3Jx…", "name": "Sam", "email": "sam@example.com" }Save
subto know it’s the same person next time. It never changes. Don’t use the email for that, because people can change it.
Sync Edge
Paste in a small JavaScript program, press Deploy, and it answers at its own link. It comes with storage, logs and help from Dash.
You get 25 programs, and each one can take 10,000 requests a day.
Open Sync Edgeexport default {
async fetch(request) {
const url = new URL(request.url);
const name = url.searchParams.get('name');
return new Response(`Hello, ${name}!`);
}
};
Stuck on something?
Email hello@sync-ai.app, or look through Help. If you find a security problem, please tell us there first.