forked from namitan/cf_auth0_sample
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlogout.cfm
More file actions
23 lines (20 loc) · 695 Bytes
/
logout.cfm
File metadata and controls
23 lines (20 loc) · 695 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<CFSET domain = Application.AUTH0_DOMAIN>
<CFSET client_id = Application.AUTH0_CLIENT_ID>
<CFSET client_secret = Application.AUTH0_CLIENT_SECRET>
<CFSET redirect_uri = Application.AUTH0_CALLBACK_URL>
<CFSET audience = Application.AUTH0_AUDIENCE>
<CFIF audience eq "">
<CFSET audience = "https://#domain#/userinfo">
</CFIF>
<CFSET auth0 = createObject("component", "Auth0").init({
'domain' : domain,
'client_id' : client_id,
'client_secret' : client_secret,
'redirect_uri' : redirect_uri,
'audience' : audience,
'scope' : 'openid profile',
'persist_id_token' : true,
'persist_access_token' : true,
'persist_refresh_token' : true
})>
<CFSET auth0.logout()>