Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Error on deploy with JWT custom authorizer

オープン
#551 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
aws, javascript, node.js
領域
api, backend, cloud

調査の方向性

示されているサービス設定の httpApi イベントと jwt-auth 関数から始め、それらの authorizer 設定を、リンクされている Auth0 のカスタム authorizer の例と比較します。HTTP API authorizer に必要な Serverless Framework の設定を確認します。完了条件は、サービスが正常にデプロイされ、/module ルートが JWT authorizer を使用することです。

索引モデルが issue の本文から書いたものです。

説明

Hi!

I'm trying to achieve something like this guide: https://github.com/serverless/examples/tree/master/aws-node-auth0-custom-authorizers-api

But when I try to deploy I'm getting this error: Event references not configured authorizer 'authorize'.

I think the only difference is that I'm using httpApi instead of http. This is my configuration:

service: xxxx

frameworkVersion: ">=1.78.0 <2.0.0"

plugins:
  - serverless-dotenv-plugin
  - serverless-offline

provider:
  name: aws
  runtime: nodejs12.x
  region: ${env:AWS_LAMBDA_REGION}
  stage: ${ opt:stage, 'local' }
  cors:
    allowedOrigins:
      - "*"

custom:
  serverless-offline:
    httpPort: ${env:LOCAL_HTTP_PORT}
    host: 0.0.0.0
    # Enables hot reloading (https://github.com/dherault/serverless-offline/issues/864#issuecomment-627419266)
    useChildProcesses: true

functions:
  jwt-auth:
    handler: handler.jwt

  module-activation-sns:
    handler: handler.sns
    events:
      - sns: ${env:AWS_SNS_ARN_MODULE_ACTIVATION}
  
  module-activation-http:
    handler: handler.http
    events:
      - httpApi:
          method: POST
          path: /module
          authorizer: jwt-auth

Thanks!

主要言語
JavaScript
スター
11.5k
フォーク
4.4k
平均マージ
2時間 55分
マージ済み PR(30日)
3

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

serverless/examples のほかの issue

serverless/examples の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。