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

Verification submission endpoint (submitSelfServiceVerificationFlow) still requires CSRF cookie for API flows #1368

Closed
aeneasr opened this issue May 20, 2021 · 1 comment
Assignees
Labels
bug Something is not working.

Comments

@aeneasr
Copy link
Member

aeneasr commented May 20, 2021

Describe the bug

The following will fail with a 400 CSRF error despite it being an API flow:

      const flow = (
        await ory
          .initializeSelfServiceVerificationForNativeApps()
          .catch(catcher)
      ).data
      await expect(
        (await ory.getSelfServiceVerificationFlow(flow.id).catch(catcher)).data
          .id
      ).toEqual(flow.id)
      expect(flow.type).toEqual('api')
      await expect(
        ory
          .submitSelfServiceVerificationFlow(flow.id, {
            method: 'link',
            email: user.email
          })
          .catch(catcher)
      ).resolves.toBeTruthy()

Expected behavior

No CSRF issue

Environment

  • Version: master
@aeneasr
Copy link
Member Author

aeneasr commented Jun 14, 2021

Note to self: still an issue

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

No branches or pull requests

1 participant