How to bypass moodle login page with oidc sso?

How to bypass moodle login page with oidc sso?

by Canew Jour -
Number of replies: 0
Hi there,
I have an aws amplify application that use cognito to login, I need to setup SSO that when user login the amplify application, they are also logged in moodle with sso. In another word, they can directly visit a moodle course content without asking for moodle credential. May I know how to configure for that ? What I am currently trying is configuring SSO with aws cognito in "OpenID Connect" moodle plugin settings, and also setup sso setting in aws cognito. As a result, when user login my amplify, they can visit the sso link "https://<moodle site>/auth/oidc/" to trigger sso and redirecting to moodle dashboard. Here comes two scenarioes:
1. If user has visit "https://<moodle site>/auth/oidc/" to sso sign in, then they can directly visit "https://<moodle site>/mod/page/view.php?id=14" for moodle course content.
2.If user has not yet visit "https://<moodle site>/auth/oidc/" to sso sign in, user will be redirected to moodle login page instead. 

I need to think of a solution to bypass login page in scenario 2, so user will by pass moodle login page and visit the course content directly. May I know how can I do that ? Thanks.
Average of ratings: -