Auto login in Countly


#1

Is there a way to login automatically to Countly with other app credentials?
Thanks


#2

I think easiest out of the box way is to create a token and use it to automatically authenticate users by passing it in URL
Token can be created under top right user icon -> drop down menu -> Token Manager -> Create Token -> Provide uses and expiry as you wish.

Or you can create it via API:
https://resources.count.ly/v1.0/reference#itokencreate

If you want to limit token for login operation only, provide end_point as "/login/token/"

And use it as
http://yourcountlyserver/login/token/YOURTOKENHERE

This will authenticate you as user to whom token belongs


#3

Thanks.
I just found out this : https://count.ly/plugins/single-sign-on
It seems to be a good solution also.

Any recommandation in favor of one this or this solution?


#4

Nope, both should be ok


#5

http://yourcountlyserver/login/token/YOURTOKENHERE method is fine but is there a way to prevent public access to it ?
I mean url can be share to anyone


#6

You can restrict token to be used only once or set time limit.
But other than that, probably not.

This is the same thing that many sites use to log you in, by sending email with login link.


#7

Ok

I understand you can allow apps when creating token.

But how do you manage admin, user and section accesses ti these apps?


#8

Actually not exactly
you can allow apps when creating user.
And then just create token for that user, to authenticate it.