Skip to content

RAA-Mathur/https-github.com-mathurr016-CA--pi-issues-43

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CA--pi

this is capi app // frontend/src/shop/index.ts

const signIn = async () => { const scopes = ["username", "payments"]; const authResponse = await window.Pi.authenticate(scopes, onIncompletePaymentFound);

/* pass obtained data to backend */ await signInUser(authResponse);

/* use the obtained data however you want */ setUser(authResponse.user); };

const signInUser = (authResult: any) => { axiosClient.post("/signin", { authResult }, config);

return setShowModal(false); };

Releases

No releases published

Packages

 
 
 

Contributors

Generated from mathurr016/CA--pi