According to the documentation, we’ll need to set user to “new” to create a new user.
But this doesn’t seem possible via grpc call because the struct ClientAcc doesn’t have the definition for “User”?
I did read the FAQ that mentions the three ways of creating a new user as below:
A user can create a new account using one of the applications (web, Android, iOS).
A new account can be created using tn-cli (acc command or useradd macro). The process can be scripted.
If the user already exists in an external database, the Tinode account can be automatically created on the first login using the rest authenticator.
There's no mention of grpc in the above. Does this mean we can't create new users with grpc calls?
I'm not familiar with tn-cli & rest authenticator. Can I use one of these to bulk create users on Tinode?
How can I go about it? Appreciate your guidance on this, thank you.
According to the documentation, we’ll need to set user to “new” to create a new user.
But this doesn’t seem possible via grpc call because the struct ClientAcc doesn’t have the definition for “User”?
I did read the FAQ that mentions the three ways of creating a new user as below:
A user can create a new account using one of the applications (web, Android, iOS).
A new account can be created using tn-cli (acc command or useradd macro). The process can be scripted.
If the user already exists in an external database, the Tinode account can be automatically created on the first login using the rest authenticator.
There's no mention of grpc in the above. Does this mean we can't create new users with grpc calls?
I'm not familiar with tn-cli & rest authenticator. Can I use one of these to bulk create users on Tinode?
How can I go about it? Appreciate your guidance on this, thank you.
--
You received this message because you are subscribed to the Google Groups "Tinode General" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tinode+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tinode/0204e78b-7f69-444d-b404-dcb5c05787d5o%40googlegroups.com.
09:18:23.590] Connecting to: wss://dev.mhub.my:6060/v0/channels?apikey=AQEAAAABAAD_rAp4DJh05a1HAwFT3A6K tinode.prod.js:1:18606
[09:18:23.649] out: {"hi":{"id":"104562","ver":"0.16.5","ua":"TinodeWeb/0.16.5 (Firefox/79.0; Linux x86_64); tinodejs/0.16.5","lang":"en-US"}} <empty string> tinode.prod.js:1:18606
[09:18:23.654] in: {"ctrl":{"id":"104562","params":{"build":"rethinkdb:undef","maxFileUploadSize":8388608,"maxMessageSize":262144,"maxSubscriberCount":128,"maxTagCount":16,"ver":"0.16"},"code":201,"text":"created","ts":"2020-08-24T09:18:23.653Z"}} <empty string> tinode.prod.js:1:18606
[09:18:23.657] out: {"login":{"id":"104563","scheme":"basic","secret":"YnhieDpieGJ4MTIz"}} <empty string> tinode.prod.js:1:18606
[09:18:23.662] in: {"ctrl":{"id":"104563","code":401,"text":"authentication failed","ts":"2020-08-24T09:18:23.661Z"}} <empty string>
On Fri, Aug 21, 2020 at 7:00 AM Yogeswari Narayasamy <yogeswari...@gmail.com> wrote:According to the documentation, we’ll need to set user to “new” to create a new user.
But this doesn’t seem possible via grpc call because the struct ClientAcc doesn’t have the definition for “User”?
UserId.
--
I did read the FAQ that mentions the three ways of creating a new user as below:
A user can create a new account using one of the applications (web, Android, iOS).
A new account can be created using tn-cli (acc command or useradd macro). The process can be scripted.
If the user already exists in an external database, the Tinode account can be automatically created on the first login using the rest authenticator.
There's no mention of grpc in the above. Does this mean we can't create new users with grpc calls?
I'm not familiar with tn-cli & rest authenticator. Can I use one of these to bulk create users on Tinode?
How can I go about it? Appreciate your guidance on this, thank you.
You received this message because you are subscribed to the Google Groups "Tinode General" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tin...@googlegroups.com.
2020/08/24 17:51:46 grpc in: hi:<id:"1" user_agent:"Golang_Spider_Bot/3.0" ver:"0.15" lang:"EN" > 8t1b-69YE1k
2020/08/24 17:51:47 grpc in: acc:<id:"2" user_id:"new" scheme:"basic" secret:"\"abcd:abcd123\"" login:true tags:"mhub:cog-user-id-0123456789-abcd" desc:<public:"\"fn:Abcd MHub\"" > cred:<method:"email" value:"ab...@example.com" > > 8t1b-69YE1k
2020/08/24 17:51:47 create user: attempt to directly assign restricted tags 8t1b-69YE1k
To unsubscribe from this group and stop receiving emails from it, send an email to tinode+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tinode/0bc15fb2-31c7-4108-900c-70276714c248o%40googlegroups.com.
Hi Gene, would you have some feedback on these questions? Appreciate your input. Thank you.On Mon, Aug 24, 2020 at 6:03 PM Yogeswari Narayasamy <yogeswari....@gmail.com> wrote:I have two additional questions based on the same code previously shared:1. When I search for user bxbx by email address, I'm getting a result but it's appearing as 'Unnamed". How can I get the user name to display correctly?
2. When I create a new user "Abcd" and try to set Tags to "Tags: []string{"mhub:cog-user-id-0123456789-abcd"},", it fails :
1. When I search for user bxbx by email address, I'm getting a result but it's appearing as 'Unnamed". How can I get the user name to display correctly?Please show server-side and client-side logs.
Public: []byte(`"fn:Efgh MHub Consumer"`),Public: []byte(`{"fn":"Sharon Gan"}`),2020/08/26 12:03:12 ws: session started -HDHWknnwqQ 1
2020/08/26
12:03:12 in:
'{"hi":{"id":"111095","ver":"0.16.5","ua":"TinodeWeb/0.16.5
(Firefox/79.0; Linux x86_64); tinodejs/0.16.5","lang":"en-US"}}'
ip='127.0.0.1:38184' sid='-HDHWknnwqQ' uid=''
2020/08/26 12:03:12 in:
'{"login":{"id":"111096","scheme":"basic","secret":"c2hhcm9uOnNoYXJvbjEyMw=="}}'
ip='127.0.0.1:38184' sid='-HDHWknnwqQ' uid=''
2020/08/26 12:04:19
in:
'{"login":{"id":"111097","scheme":"basic","secret":"c2hhcm9uOnNoYXJvbjEyMw=="}}'
ip='127.0.0.1:38184' sid='-HDHWknnwqQ' uid=''
[04:04:19.950]
out:
{"login":{"id":"111097","scheme":"basic","secret":"c2hhcm9uOnNoYXJvbjEyMw=="}}
<empty string> tinode.prod.js:1:18606
[04:04:19.974] in:
{"ctrl":{"id":"111097","code":401,"text":"authentication
failed","ts":"2020-08-26T04:04:19.953Z"}} <empty string> requests := []*pbx.ClientMsg{
&pbx.ClientMsg{
Message: &pbx.ClientMsg_Hi{Hi: &pbx.ClientHi{
Id: "1",
UserAgent: "Golang_Spider_Bot/3.0",
Ver: "0.15",
Lang: "EN",
}},
},
&pbx.ClientMsg{
Message: &pbx.ClientMsg_Acc{
Acc: &pbx.ClientAcc{
Id: "2",
UserId: "new",
Scheme: "basic", // basic
Secret: []byte(`"sharon:sharon123"`), // bob:bob123
Login: true,
Desc: &pbx.SetDesc{
Public: []byte(`{"fn":"Sharon Gan"}`),
},
Cred: []*pbx.ClientCred{
&pbx.ClientCred{Method: "email", Value: "sha...@example.com"},
},
Tags: []string{"email:sha...@example.com"}, // need this, otherwise can't find user
},
},
},
}
2020/08/26 11:45:44 grpc in: hi:<id:"1" user_agent:"Golang_Spider_Bot/3.0" ver:"0.15" lang:"EN" > Ztc4nh8xt-U
2020/08/26
11:45:45 grpc in: acc:<id:"2" user_id:"new" scheme:"basic"
secret:"\"sharon:sharon123\"" login:true tags:"email:sha...@example.com"
desc:<public:"{\"fn\":\"Sharon Gan\"}" > cred:<method:"email"
value:"sha...@example.com" > > Ztc4nh8xt-U
2020/08/26 11:45:45 add cred tags update failed: <nil>
2020/08/26
11:45:58 in:
'{"set":{"id":"83325","topic":"fnd","desc":{"public":"email:sha...@example.com"}}}'
ip='127.0.0.1:35786' sid='2kg4f_V45GQ' uid='N903mmDxSbQ'
2020/08/26
11:45:58 in: '{"get":{"id":"83326","topic":"fnd","what":"sub"}}'
ip='127.0.0.1:35786' sid='2kg4f_V45GQ' uid='N903mmDxSbQ'
Starting to do a createUser BiDi Streaming RPC...
Sending message: hi:<id:"1" user_agent:"Golang_Spider_Bot/3.0" ver:"0.15" lang:"EN" >
Received:
&{id:"1" code:201 text:"created" params:<key:"build"
value:"\"rethinkdb:undef\"" > params:<key:"maxFileUploadSize"
value:"8388608" > params:<key:"maxMessageSize" value:"262144" >
params:<key:"maxSubscriberCount" value:"128" >
params:<key:"maxTagCount" value:"16" > params:<key:"ver"
value:"\"0.16\"" > }
Sending message: acc:<id:"2" user_id:"new"
scheme:"basic" secret:"\"sharon:sharon123\"" login:true
tags:"email:sha...@example.com" desc:<public:"{\"fn\":\"Sharon
Gan\"}" > cred:<method:"email" value:"sha...@example.com" >
>
Received: &{id:"2" code:200 text:"ok"
params:<key:"authlvl" value:"\"auth\"" > params:<key:"desc"
value:"{\"created\":\"2020-08-26T03:45:45.379Z\",\"updated\":\"2020-08-26T03:45:45.379Z\",\"defacs\":{\"auth\":\"JRWPAS\",\"anon\":\"N\"},\"public\":{\"fn\":\"Sharon
Gan\"}}" > params:<key:"expires"
value:"\"2020-09-09T03:45:45.49Z\"" > params:<key:"token"
value:"\"m7EJawhymvPpT1hfFAABAAEActMRMjpjgdWXAyFMKba6v2U3tX3vWsHQD0grfIIOGuU=\""
> params:<key:"user" value:"\"usrm7EJawhymvM\"" > }