Apollo federation v2 authentication in router

Hi,
Just completed the Voyage II tutorial. Really liked it :smiley:
However, authentication is done in subgraphs. Wouldn’t it be better to authenticate the token in router once, if the req is passed, make the authorization in subgraphs? Is it possible to config router this way?

Thanks

There is experimental support for JWT authentication in the router, does that meet your needs?

Hi,
Sure… will try it out ASAP.Any time plan to release it?
thanks

Hey @dylan
in JWT Authentication in the Apollo Router - Apollo GraphQL Docs. it’s showing

I got error when supplying jwks_urls as array. Needed to use like

authentication:
  experimental:
    jwt:
      jwks_url: http://localhost:3100/.well-known/jwks.json
      header_name: Authorization
      header_value_prefix: Bearer
      cooldown: 15s

Added a question in https://github.com/apollographql/router/discussions/2602
would appreciate if you can take look.
Thanks