The
If type is not Facebook or Google then use access token endpoint and other attributes.
<cfoauth>
cfoauth();
Facebook
Google
The following example shows a simple authentication:
<cflogin>
<cfoauth
type="Facebook"
clientid="YOUR_CLIENT_ID"
secretkey="YOUR_SECRET_KEY"
result="res"
redirecturi="http://localhost:8500/doc/login.cfm"
>
<cfloginuser name="#res.other.username#" password="#res.access_token#" roles="user"/>
</cflogin>
<cflocation url="http://localhost:8500/doc/index.cfm">
The following example shows a simple authentication:
cflogin() {
cfoauth(
type="Google",
clientid="YOUR_CLIENT_ID",
secretkey="YOUR_GOOGLE_CLIENTSECRET",
redirecturi="YOUR_CALLBACK_URI",
result="res",
scope="YOUR_SCOPES",
state="cftoken=#cftoken#"
);
cfloginuser(name="#res.other.email#", password="#res.access_token#", roles="user");
}
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.