Skip to content

brought api keys from admin to user level with app install#2

Merged
DexterStorey merged 3 commits intotedspare/cleanupfrom
dexterstorey/encryption
Aug 28, 2023
Merged

brought api keys from admin to user level with app install#2
DexterStorey merged 3 commits intotedspare/cleanupfrom
dexterstorey/encryption

Conversation

@DexterStorey
Copy link
Copy Markdown

What does this PR do?

Fixes # (issue)

Requirement/Documentation

  • If there is a requirement document, please, share it here.
  • If there is ab UI/UX design document, please, share it here.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Chore (refactoring code, technical debt, workflow improvements)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How should this be tested?

  • Are there environment variables that should be set?
  • What are the minimal test data to have?
  • What is expected (happy path) to have (input and output)?
  • Any other important info that could help to test that PR

Mandatory Tasks

  • Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.

Checklist

  • I haven't read the contributing guide
  • My code doesn't follow the style guidelines of this project
  • I haven't commented my code, particularly in hard-to-understand areas
  • I haven't checked if my PR needs changes to the documentation
  • I haven't checked if my changes generate no new warnings
  • I haven't added tests that prove my fix is effective or that my feature works
  • I haven't checked if new and existing unit tests pass locally with my changes

@vercel
Copy link
Copy Markdown

vercel bot commented Aug 28, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
cal-com-ai ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 28, 2023 4:07pm

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should let user book with only subject or body

const { hash: apiKeyHashed, initVector: apiKeyIV } = encrypt(env.CAL_API_KEY);
const userId = user.id.toString();
const { hash: apiKeyHashed, initVector: apiKeyIV } = encrypt(key);
const { hash: userIdHashed, initVector: userIdIV } = encrypt(user.id.toString());
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

encrypt user Id for now

apiKeyIV: string;
}) => {
// TODO: fix
return [
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getEventTypes is failing in main on cal side

};

export default handler;
import type { NextApiRequest, NextApiResponse } from "next";
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this works to create the api key and put it in creds - but app doesn't show installed on FE - even though it is.

@DexterStorey DexterStorey merged commit 7a549ae into tedspare/cleanup Aug 28, 2023
@DexterStorey
Copy link
Copy Markdown
Author

Build Pass - LGTM

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

Successfully merging this pull request may close these issues.

1 participant