limbera
04/13/2023, 11:17 AMreshma
04/13/2023, 7:01 PMreshma
04/14/2023, 3:02 AMvork_jmc
04/15/2023, 11:03 PMcrypto is not defined. This looks to be because the auth functions in the SDK depend on the web crypto API.reshma
04/17/2023, 2:08 PMrahul1
04/17/2023, 9:25 PMvork_jmc
04/17/2023, 9:26 PMoptions parameter, but I'd like to confirm this and get an example.
(2) is that new? I believe I used startClientLogin to auth the client and perform actions. Is setBasicAuth the same?vork_jmc
04/17/2023, 9:29 PMrahul1
04/17/2023, 9:37 PMrahul1
04/17/2023, 9:57 PMcrypto issue to solve your problem of running a function AS the user, but Basic Auth / Client Credentials should at least unblock you from being able to make Medplum API callscody
04/17/2023, 10:20 PMMedplumClient today.vork_jmc
04/17/2023, 10:29 PMrahul1
04/17/2023, 11:09 PMmedplum.getActiveLogin()) , which could be cached server side
https://cloudentity.com/developers/blog/adding-oauth-proxy-bff-component-to-spa/
https://dev.to/damikun/web-app-security-understanding-the-meaning-of-the-bff-pattern-i85
https://abstarreveld.medium.com/what-is-a-bff-and-how-to-build-one-e2a2b78cfc43rahul1
04/17/2023, 11:11 PMvork_jmc
04/17/2023, 11:15 PMimport { CredentialResponse, GoogleLogin, GoogleOAuthProvider } from "@react-oauth/google"
import { trpc } from "../utils"
const SignUp = () => {
const signUp = trpc.signUp.useMutation();
const handleSuccess = ({ clientId, credential }: CredentialResponse) => {
if (clientId && credential) signUp.mutate({ googleClientId: clientId, googleCredential: credential })
}
return (
<GoogleOAuthProvider clientId="936888910715-fbs96p0heu961p6a6jmakq8gkaquoebo.apps.googleusercontent.com">
<div style={{ minHeight: '100vh' }}>
<GoogleLogin onSuccess={handleSuccess} onError={console.error} />
</div>
</GoogleOAuthProvider>
)
}
export default SignUprahul1
04/17/2023, 11:39 PMmedplum.startGoogleLogin on the client as well, and then potentially caching the login state in your BFFrahul1
04/17/2023, 11:39 PMmedplum.setActiveLogin to set those credientials on your API client and make the callrahul1
04/17/2023, 11:40 PMvork_jmc
04/18/2023, 12:02 AMrahul1
04/18/2023, 12:10 AMmaxmblack
09/11/2023, 1:10 PM