Forum

Results 1 to 5 of 5
  1. #1
    Join Date
    March 2016
    Posts
    2

    URI Generation -- Login Flow..

    Hi guys, i have a few questions i am looking for help with. First i'll explain my use case..

    1. User registers on website
    2. Website generates a new user on Teamspeak using "privilegekeyadd" using the query interface.
    Example: privilegekeyadd tokentype=0 tokenid1=8 tokenid2=0 tokendescription="test200"
    3. Teamspeak URI link is generated as follows
    ts3server://{url}?nickname={username}&token={token}

    This user flow is working well first time..

    When the URI is used again, it reports that the privilege key has already been used. My questions are:

    1. Is this the correct login flow using a website as the "source of truth" and control center.
    2. As a privilege key is a one use item, how do i generate a url that will log the user in. (Do i pass a user UUID instead? If so what param).

    Is the URI schema documented anywhere? I can't seem to find it.

    Thanks for any help,
    Blue

  2. #2
    Join Date
    June 2008
    Posts
    18,119
    1. It's correct for registration and the first conenction for a user.
    But you need to remove the token parmater if that privilege key does not exist anymore.

    2. You may add addbookmark= so the user has the bookmark and does not need to click the URL anymore.
    and yes there is an FAQ entry for this.
    https://support.teamspeakusa.com/ind...-on-my-webpage
    When sending me private messages: Please make sure to include reference link to your forum thread or post.

    TeamSpeak FAQ || What should i report, when i open a client thread?

  3. #3
    Join Date
    March 2016
    Posts
    2
    Thanks for responding, but that didn't solve me issue..
    I am really struggling to understand user flows and fit it to mine.

    I understand that a:

    1. Priv key can be created
    2. User logs in with Priv key

    What happens if the user does not bookmark Teamspeak though? Is there a way to pass some sort of ID with the URL, such as a UUID or token to id them every time they click on the website link?

    Thanks,
    iRBlue

  4. #4
    Join Date
    June 2008
    Posts
    18,119
    You just need to give/offer users a different URL for the second login.
    Just remove the token part and offer that url -> done.
    When sending me private messages: Please make sure to include reference link to your forum thread or post.

    TeamSpeak FAQ || What should i report, when i open a client thread?

  5. #5
    Join Date
    February 2012
    Location
    Germany
    Posts
    573
    What you're perhaps missing is the Teamspeak client part. The Teamspeak client generates an identity on its first start. Whenever the client connects to a Teamspeak server for the first time, the server immediately creates an entry for this identity in its internal user database. Then, with the token, you grant this identity in the user database some group membership on your server. This explains why the token is used up with the first use: there is no point in adding the same group membership to the same identity again.

    You cannot control what identity the user is choosing in his Teamspeak client. This identity is created independently on the first start of the clinet. Usually, he will use the default identity for his whole lifetime. But it's possible to create a new one manually, or if someone reinstalls his Windows, and he doesn't export his old identity and imports it to his new installation, the client creates a new one.

    So what you should do is:
    - if a website user wants to connect to the Teamspeak server for the first time, create a token for him and generate the link with the token. His identity is registered on the Teamspeak server on connect automatically and granted access by the token automatically.
    - if a website user skipped creating a bookmark and wants to connect to the Teamspeak server via website again, don't create a token for him and generate the link without the token. His login privileges are granted to him automatically, since his Teamspeak identity is granted permission, and this is saved in the user database of the server.
    - if a website user formatted his pc and lost his identity, he needs a new token. Provide him with an additional button where he can create a new token. In this case, you should remove his previous account on the Teamspeak server, because it is orphaned and will never be used again.
    - if you have to revoke someone's access/remove an account, use the query interface to remove that user entry from the Teamspeak user database. To make this work, you have to save some kind of identifier, for example a userid, that is used on your website in the Teamspeak user database for this user. There are examples in this thread. Use the "tokencustomset" parameter at token creation and provide the userid. This is saved as custom information in the Teamspeak user database. To remove the user, use the query interface and search for the user with the userid in its custom information field.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Question about token key generation and permisions
    By Nicocaps in forum Permission System
    Replies: 1
    Last Post: February 17th, 2011, 08:03 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •