You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rename handler methods to make them public. Method names starting with underscore _ are considered private by convention.
Even though these methods are accessible from outside now(Javascript language doesn't understand this _ prefix convention), we think it makes more sense for them to be explicitly public for our use case.
We are planning to use this library for our new authentication gateway application. As opposed to the intended use case of this library, which is to use the handle method to place static S3 files behind an authentication gate, we are planning to use the individual handler methods directly in our app. This auth gateway app will be a set of Lambda@Edge handlers that work as an intermediary between React frontend clients and AWS Cognito to do
authentication duties,
exchange code for tokens, and
sending tokens as HttpOnly cookies, which clients can use to communicate with some Amazon internal API's
Handlers
/signIn: Mapped to the existing method _getRedirectToCognitoUserPoolResponse
/parseAuth: Mapped to existing method _fetchTokensFromCode
/refreshToken: Mapped to existing method _fetchTokensFromRefreshToken
In our Cloudfront distribution setup, we'd do something like this (notice no underscore prefixes)
What would you like to be added:
Rename handler methods to make them public. Method names starting with underscore
_
are considered private by convention.Even though these methods are accessible from outside now(Javascript language doesn't understand this
_
prefix convention), we think it makes more sense for them to be explicitly public for our use case.Why is this needed:
We are planning to use this library for our new authentication gateway application. As opposed to the intended use case of this library, which is to use the
handle
method to place static S3 files behind an authentication gate, we are planning to use the individual handler methods directly in our app. This auth gateway app will be a set of Lambda@Edge handlers that work as an intermediary between React frontend clients and AWS Cognito to doHandlers
/signIn
: Mapped to the existing method_getRedirectToCognitoUserPoolResponse
/parseAuth
: Mapped to existing method_fetchTokensFromCode
/refreshToken
: Mapped to existing method_fetchTokensFromRefreshToken
In our Cloudfront distribution setup, we'd do something like this (notice no underscore prefixes)
Slack or email me on [email protected] for additional details
The text was updated successfully, but these errors were encountered: