@@ -14,13 +14,68 @@ const OryHeroDemo = () => {
1414 const terminalRef = useRef ( null )
1515
1616 const script = [
17+ // CLI setup
18+ { type : "comment" , text : "# One-time project setup via Ory CLI" , delay : 0 } ,
19+ { type : "command" , text : "brew install ory/tap/cli" , delay : 300 } ,
20+ { type : "output" , text : "Installing ory..." , delay : 500 } ,
21+ { type : "success" , text : "✓ Installed" , delay : 600 } ,
22+ { type : "command" , text : "ory auth" , delay : 400 } ,
1723 {
18- type : "line" ,
19- number : 1 ,
20- text : "From zero to registered user in minutes!" ,
21- delay : 300 ,
24+ type : "output" ,
25+ text : "Opening browser to create your Ory developer account..." ,
26+ delay : 500 ,
27+ } ,
28+ { type : "success" , text : "✓ Authenticated as <your-email>" , delay : 700 } ,
29+ { type : "command" , text : 'ory create project --name "MyApp"' , delay : 400 } ,
30+ { type : "output" , text : "Project slug: myapp-abc123" , delay : 600 } ,
31+ { type : "success" , text : "✓ Project created" , delay : 200 } ,
32+
33+ // API registration
34+ { type : "comment" , text : "# Register a user via Ory API" , delay : 600 } ,
35+ {
36+ type : "note" ,
37+ text : "Note: Traits depend on your identity schema. This sample uses Ory's 'username' preset schema." ,
38+ delay : 400 ,
39+ } ,
40+ { type : "command" , text : "curl -s -X GET \\" , delay : 300 } ,
41+ {
42+ type : "command-cont" ,
43+ text : ' "https://<YOUR_PROJECT_SLUG>.projects.oryapis.com/self-service/registration/api"' ,
44+ delay : 100 ,
45+ } ,
46+ {
47+ type : "output" ,
48+ text : '{ "id": "<FLOW_ID>", "type": "api", "expires_at":"...","issued_at":"...","request_url":"<YOUR_PROJECT_SLUG>/self-service/registration/api","ui":{"action":"<YOUR_PROJECT_SLUG>.projects.oryapis.com/self-service/registration?flow=<FLOW_ID>","method":"POST", ... } }' ,
49+ delay : 500 ,
50+ } ,
51+ { type : "command" , text : "curl -s -X POST \\" , delay : 400 } ,
52+ {
53+ type : "command-cont" ,
54+ text : ' -H "Content-Type: application/json" \\' ,
55+ delay : 100 ,
56+ } ,
57+ {
58+ type : "command-cont" ,
59+ text : ' -d \'{"traits":{"username":"<YOUR_USERNAME>"},"password":"<YOUR_PASSWORD>","method":"password"}\' \\' ,
60+ delay : 100 ,
61+ } ,
62+ {
63+ type : "command-cont" ,
64+ text : ' "https://<YOUR_PROJECT_SLUG>.projects.oryapis.com/self-service/registration?flow=<FLOW_ID>"' ,
65+ delay : 100 ,
66+ } ,
67+ {
68+ type : "output" ,
69+ text : '{"identity":{"id":"...","schema_id":"preset://username","schema_url":"<YOUR_PROJECT_SLUG>.projects.oryapis.com/schemas/cHJlc2V0Oi8vdXNlcm5hbWU","state":"active", ... } }' ,
70+ delay : 600 ,
71+ } ,
72+ { type : "success" , text : "✓ User registered!" , delay : 400 } ,
73+ {
74+ type : "link" ,
75+ text : "Create your free project via Ory Console →" ,
76+ url : "https://console.ory.sh/" ,
77+ delay : 400 ,
2278 } ,
23- { type : "line" , number : 2 , text : "Click 'Run'." , delay : 300 } ,
2479 ]
2580
2681 const runDemo = async ( ) => {
0 commit comments