Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request body is empty for POST Requests Golang #116

Closed
alisha-virani opened this issue May 30, 2022 · 1 comment
Closed

Request body is empty for POST Requests Golang #116

alisha-virani opened this issue May 30, 2022 · 1 comment
Assignees

Comments

@alisha-virani
Copy link

alisha-virani commented May 30, 2022

Request body of Signup POST API is empty after calling original implementation.

Use case: To pass and use additional key value pairs from the request body of Signup POST API

						// First we copy the original implementation
						originalThirdPartySignInUpPOST := *originalImplementation.ThirdPartySignInUpPOST

						// we override the thirdpartyemailpassword signinup POST API to return the social provider's access token
						(*originalImplementation.ThirdPartySignInUpPOST) = func(provider tpmodels.TypeProvider, code string, authCodeResponse interface{}, redirectURI string, options tpmodels.APIOptions, userContext supertokens.UserContext) (tpepmodels.ThirdPartyOutput, error) {

							body := options.Req.Body

							strBody, err := ioutil.ReadAll(body)
							if err != nil {
								fmt.Println("err in printing body", err)
							}
							fmt.Printf("strBody??? %s", strBody)```
@rishabhpoddar
Copy link
Contributor

Fix released in version 0.6.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants