Skip to content

WildRydes WebApp with Cognito

0

I have been using WildRydes with my students. I recently noticed that the WebApp doesn't work anymore with Cognito, I cannot register a user through the WildRydes interface. I assume some changes to Cognito are responsible for this. Is anybody still using WildRydes and has found a bypass by modifying some of the code? I updated the libraries in the /vendor folder, with no effect, and tried to manually create a user and log them in to the user pool through the login page provided by Cognito. The token isn't passed to Lambda. Any help would be appreciated.

asked 2 years ago136 views

1 Answer
0

I apologize, but I don't have specific information about recent changes to the WildRydes WebApp or its interaction with Amazon Cognito that might be causing the issues you're experiencing. However, I can provide some general insights and suggestions based on how Cognito works with web applications.

If you're unable to register users through the WildRydes interface, it's possible that there have been changes in how the application integrates with Cognito's API. The application needs to properly integrate with both the Amazon Cognito user pools API and the authentication API endpoints to manage user registration, sign-in, and token handling.

Regarding the token not being passed to Lambda, this could be related to how the application is handling the tokens after authentication. After a successful sign-in, Cognito provides ID tokens, access tokens, and refresh tokens. The application needs to properly capture and use these tokens to authenticate requests to your backend services, including Lambda functions.

Here are a few suggestions that might help:

  1. Verify that the app's configuration (like user pool ID, app client ID) is still correct and matches your Cognito setup.

  2. Check if there have been any updates to the WildRydes sample code or documentation that address recent Cognito changes.

  3. Review the Cognito integration in the application code, especially parts dealing with user registration, authentication, and token handling.

  4. Ensure that the application is properly verifying and using the Cognito tokens, including checking for token expiration and using the correct token type (access token for API calls).

  5. If you're using the Cognito hosted UI for login, make sure it's correctly configured and the app is handling the redirect and token exchange properly.

  6. Consider implementing token revocation and refresh mechanisms if they're not already in place, as these can help manage user sessions more effectively.

If these general suggestions don't help, you might need to do a more detailed debugging of the application's interaction with Cognito, possibly by adding logging or using browser developer tools to track the authentication flow.
Sources
User pool sign-in with a third party identity provider - Amazon Cognito
Understanding user pool JSON web tokens (JWTs) - Amazon Cognito
Verifying a JSON Web Token - Amazon Cognito

answered 2 years ago

  • Are there any good samples that show Cognito integration with Lambda or API Gateway, without forcing me to use Amplify?

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.