Does Cognito IdP Issuer URI map to something similar to the other URIs and endpoints? #627
|
Hello, I've been working on getting a user pool setup for an OIDC flow for our application, however I can't tell if the issuer uri is pointing to a real AWS (since it has the amazonaws.com in there) or if there's a different URI I can use that routes to ministack Similar to the way the execute-api endpoints are mapped a little differently than for example what my CDK command dumps out (That is, http://< ID >.execute-api.localhost:4566/prod/ vs the amazonaws.com one that CDK produces) Any help would be greatly appreciated, thank you! And thank you for all of your efforts in getting ministack going! |
Replies: 1 comment 5 replies
|
Which version of ministack are you using? You should point your SDK to That should be a valid TypeScript example: import { UserManager } from "oidc-client-ts";
export const userManager = new UserManager({
authority: "https://cognito-idp.us-east-1.amazonaws.com/us-east-1_123456789",
metadataUrl: "http://localhost:4566/.well-known/openid-configuration",
client_id: "your-client-id",
redirect_uri: "http://localhost:3000/callback",
post_logout_redirect_uri: "http://localhost:3000/logout",
response_type: "code",
scope: "openid email profile",
}); |
Hi @ocr-lasagna the issuer field is correct as-is... Cognito uses that exact AWS URL inside the JWT
issclaim, and SDKs only string-compare it. Nothing actually fetches it. The real endpoints (jwks_uri,token_endpoint, etc.) already point atlocalhost:4566in the discovery doc, which is whatoidc-client-tsuses viametadataUrl.For the Keycloak guide you're following (that
/oauth2/idpresponsecallback) isn't implemented on our side yet. We have/saml2/idpresponseworking for SAML upstreams, but the OIDC equivalent (so Keycloak can redirect back with a code and we exchange it for tokens) is missing.SAML federation works end-to-end today; OIDC doesn't.
I'll open an issue to track it.