Skip to main content
Participating Frequently
September 14, 2018
Question

CF2018 - cflogin or cfthread logging user out

  • September 14, 2018
  • 1 reply
  • 847 views

I upgraded to CF2018 from CF2016, running on a Windows 2016 Server with IIS. I am using subdomains.  Example: A user logs into app.mydomain.com using cflogin and they click a button to create a batch of work to do.  The button click launches an ajax remote call to job.mydomain.com to setup a job queue in the database sets a task in the CF Scheduler.

The scheduler launches the job page on job.mydomain.com that queries the job info.  It knows what subdomain it was from and what user created it, so within a cfthread it executes a remote call to app.mydomain.com and does a cflogin allowconcurrent=true for the userid that was sent.  This way it can know the permissions and whether this user can process it.

In CF 2016 it works great.  Upon upgrading to CF 2018 it logs the user out as soon as the scheduler runs and does the cflogin within the thread.

Does anyone have any idea what might have changed from 2016 to 2018 that may have broken this?  Or any ideas how I can implement so it will work again?

This topic has been closed for replies.

1 reply

douglas_tAuthor
Participating Frequently
September 14, 2018

So I found that if I add a unique name to cflogin, then it works as desired.  It is like the allowConcurrent stopped working.  I will have to do some tests to see if that is correct or if something else is going on.

BKBK
Community Expert
Community Expert
September 16, 2018

What do you mean by "add a unique name to cflogin"? What value do you use for the cookie domain attribute?

douglas_tAuthor
Participating Frequently
September 18, 2018

I guess it would be the <cfloginuser name="name">

So when a user logs in it will log them in with their email address: <cfloginuser name="email@email.com" permissions="x">

When the job queue runs it starts this thread (very basic example)

<cfthread><cflogin><cfloginuser name="email@email.com" permissions="x"></cflogin></cfthread>

But it would log the user that is logged in out with that same email address.  I found that if I just added a unique value to the end of the email address then it would leave them logged in and do it's job.