Skip to content

Commit

Permalink
docs(readme): 📝 Updated badges
Browse files Browse the repository at this point in the history
  • Loading branch information
itpropro committed Dec 28, 2023
1 parent a6ce967 commit 582bcf7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -421,13 +421,13 @@ npm run release
```
<!-- Badges -->
[npm-version-src]: https://img.shields.io/npm/v/%40itpropro/nuxt-oidc-auth?labelColor=18181B&color=28CF8D
[npm-version-src]: https://img.shields.io/npm/v/nuxt-oidc-auth?labelColor=18181B&color=28CF8D
[npm-version-href]: https://npmjs.com/package/nuxt-oidc-auth
[npm-downloads-src]: https://img.shields.io/npm/dm/%40itpropro/nuxt-oidc-auth?labelColor=18181B&color=28CF8D
[npm-downloads-src]: https://img.shields.io/npm/dm/nuxt-oidc-auth?labelColor=18181B&color=28CF8D
[npm-downloads-href]: https://npmjs.com/package/nuxt-oidc-auth
[license-src]: https://img.shields.io/npm/l/%40itpropro%2Fnuxt-oidc-auth?labelColor=18181B&color=28CF8D
[license-src]: https://img.shields.io/npm/l/nuxt-oidc-auth?labelColor=18181B&color=28CF8D
[license-href]: https://npmjs.com/package/nuxt-oidc-auth
[nuxt-src]: https://img.shields.io/badge/Nuxt-18181B?logo=nuxt.js
Expand Down
2 changes: 2 additions & 0 deletions src/runtime/server/utils/security.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ export function generateRandomUrlSafeString(length: number = 48): string {
* @returns The base64 encoded encrypted refresh token and the base64 encoded initialization vector.
*/
export async function encryptToken(token: string, key: string): Promise<EncryptedToken> {
// TODO: Replace Buffer
const secretKey = await subtle.importKey('raw', Buffer.from(key, 'base64'), {
name: 'AES-GCM',
length: 256
Expand All @@ -148,6 +149,7 @@ export async function encryptToken(token: string, key: string): Promise<Encrypte
*/
export async function decryptToken(input: EncryptedToken, key: string): Promise<string> {
const { encryptedToken, iv } = input
// TODO: Replace Buffer
const secretKey = await subtle.importKey('raw', Buffer.from(key, 'base64'), {
name: 'AES-GCM',
length: 256
Expand Down

0 comments on commit 582bcf7

Please sign in to comment.