Tausif,

By default cas will try each authentication method until one is successful (or 
user can select authn source). It is expected that users in one store are not 
in another.
Take a look at 
https://apereo.github.io/cas/7.1.x/integration/Delegate-Authentication-PostProcessing.html
and maybe https://fawnoos.com/2024/06/09/cas70x-authn-handlers/

Ray


On Thu, 2024-10-10 at 09:35 -0700, Tausif Iqbal wrote:
You don't often get email from tausifiqbalt...@gmail.com. Learn why this is 
important<https://aka.ms/LearnAboutSenderIdentification>
Hello CAS community,
I'm new to CAS,
I'm trying to implement a webflow that allows user to login through
i) email , password
ii) OAuth (gmail, authentication delegation)

so far I have integrated mysql database with CAS and I am able to login through 
email and password,
I also have integrated gmail authentication delegation, the issue I am facing , 
after authenticating with gmail the user is getting login in , even there is no 
entry for that user in the database.

below is my cas.properties
# Database connection
cas.authn.jdbc.query[0].driver-class=com.mysql.cj.jdbc.Driver
cas.authn.jdbc.query[0].url=jdbc:mysql://user-db:3306/casdb
cas.authn.jdbc.query[0].dialect=org.hibernate.dialect.MySQLDialect
cas.authn.jdbc.query[0].user=strand
cas.authn.jdbc.query[0].password=passwrod1234
cas.authn.jdbc.query[0].sql=SELECT * FROM users WHERE email = ?
cas.authn.jdbc.query[0].field-password=password
# OAuth
cas.authn.pac4j.oidc[0].google.discovery-uri=https://accounts.google.com/.well-known/openid-configuration
cas.authn.pac4j.oidc[0].google.id=1098068053073-d3gc447aoki6r3ro7a3fd1t14h8ig3an.apps.googleusercontent.com
cas.authn.pac4j.oidc[0].google.secret=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
cas.authn.pac4j.oidc[0].google.callback-url-type=QUERY_PARAMETER
cas.authn.pac4j.oidc[0].google.callback-url=https://localhost:8081/cas/login

Can someone provide a step-by-step guide or point me to relevant documentation 
on how to achieve this, mainly how to do database lookup after OAuth?
Any code examples or configuration snippets would be greatly appreciated.

Thank you in advance for your help!

-- 
- Website: https://apereo.github.io/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cas-user+unsubscr...@apereo.org.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/cc7659a20fccac60a5733a2ce3be9227f356b2e4.camel%40uvic.ca.

Reply via email to