# How to use web\_user module

**URL:** https://discuss.tryton.org/t/how-to-use-web-user-module/1360
**Category:** Developer
**Tags:** web-user
**Created:** [April 26, 2019, 1:29am UTC](https://discuss.tryton.org/t/how-to-use-web-user-module/1360 "2019-04-26T01:29:59Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![iehoshia](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/iehoshia/32/243_2.png) [@iehoshia](https://discuss.tryton.org/u/iehoshia)
#### Post date: [April 26, 2019, 1:29am UTC](https://discuss.tryton.org/t/how-to-use-web-user-module/1360/1 "2019-04-26T01:29:59Z")

</div>

Hi,

I would like to know how web\_user module works or how to use it. I’m not sure if these module is designed to external auth or to login inside tryton?

Thanks in advance!

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [April 29, 2019, 9:00am UTC](https://discuss.tryton.org/t/how-to-use-web-user-module/1360/2 "2019-04-29T09:00:39Z")

</div>

> [@iehoshia](#):
>
> I would like to know how web\_user module works or how to use it. I’m not sure if these module is designed to external auth or to login inside tryton?

This module is used to manage autentication of web interfaces users. It can be used with flask\_tryton to develop customer portals or webshops.

---

<div class="post-metadata">

### Author: ![iehoshia](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/iehoshia/32/243_2.png) [@iehoshia](https://discuss.tryton.org/u/iehoshia)
#### Post date: [May 3, 2019, 1:30am UTC](https://discuss.tryton.org/t/how-to-use-web-user-module/1360/3 "2019-05-03T01:30:08Z")

</div>

Today I was trying the module. First I configured trytond.conf email section [Configuration file — Tryton server](http://docs.tryton.org/projects/server/en/latest/topics/configuration.html#email) and after installing I was trying the validate\_password and reset\_password buttons, but I receive the follows message:

Traceback (most recent call last):  
File “/opt/lib/python37/site-packages/trytond/wsgipy”, line 73, in dispatch\_request  
return endpoint(request, \*\*requestview\_args)  
File “/opt/lib/python37/site-packages/trytond/protocols/dispatcherpy”, line 46, in rpc  
request, database\_name, \*requestrpc\_params)  
File “/opt/lib/python37/site-packages/trytond/wsgipy”, line 44, in auth\_required  
return wrapped(\*args, \*\*kwargs)  
File “/opt/lib/python37/site-packages/trytond/protocols/wrapperspy”, line 122, in wrapper  
return func(request, pool, \*args, \*\*kwargs)  
File “/opt/lib/python37/site-packages/trytond/protocols/dispatcherpy”, line 199, in \_dispatch  
transactioncommit()  
File “/opt/lib/python37/site-packages/trytond/transactionpy”, line 209, in commit  
datamanagertpc\_vote(self)  
File “/opt/lib/python37/site-packages/trytond/sendmailpy”, line 94, in tpc\_vote  
self\_server = get\_smtp\_server(selfuri)  
File “/opt/lib/python37/site-packages/trytond/sendmailpy”, line 55, in get\_smtp\_server  
server = smtplibSMTP(urihostname, uriport, \*\*extra)  
File “/usr/lib/python37/smtplibpy”, line 251, in **init**  
(code, msg) = selfconnect(host, port)  
File “/usr/lib/python37/smtplibpy”, line 335, in connect  
selfsock = self\_get\_socket(host, port, selftimeout)  
File “/usr/lib/python37/smtplibpy”, line 306, in \_get\_socket  
selfsource\_address)  
File “/usr/lib/python37/socketpy”, line 712, in create\_connection  
raise err  
File “/usr/lib/python37/socketpy”, line 703, in create\_connection  
sockconnect(sa)  
ConnectionRefusedError: [Errno 111] Connection refused

Did I forget some configuration to try the module?

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [May 3, 2019, 7:07am UTC](https://discuss.tryton.org/t/how-to-use-web-user-module/1360/4 "2019-05-03T07:07:49Z")

</div>

The email configuration is not correctly setup: [Configuration file — Tryton server](http://docs.tryton.org/projects/server/en/latest/topics/configuration.html#email)

---

<div class="post-metadata">

### Author: ![iehoshia](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/iehoshia/32/243_2.png) [@iehoshia](https://discuss.tryton.org/u/iehoshia)
#### Post date: [May 8, 2019, 3:54pm UTC](https://discuss.tryton.org/t/how-to-use-web-user-module/1360/5 "2019-05-08T15:54:33Z")

</div>

Thanks, I fixed it using the correct uri for email.

---

<div class="post-metadata">

### Author: ![iehoshia](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/iehoshia/32/243_2.png) [@iehoshia](https://discuss.tryton.org/u/iehoshia)
#### Post date: [May 10, 2019, 5:41pm UTC](https://discuss.tryton.org/t/how-to-use-web-user-module/1360/6 "2019-05-10T17:41:52Z")

</div>

In the main config file of tryton, I need to define reset\_password\_url and email\_validation\_url ([Web User Module — Tryton module to manage Web users](http://docs.tryton.org/projects/modules-web-user/en/latest/#configuration)), the url is the same that tryton server? Or I need to define it from a third web application? If not, how I need to define the correct url?

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [May 10, 2019, 8:55pm UTC](https://discuss.tryton.org/t/how-to-use-web-user-module/1360/7 "2019-05-10T20:55:09Z")

</div>

You have to set them to point to specific entrypoint on your website. Those entrypoint will have to call the proper methods, respectively: `set_password_url` and `validate_email_url` or `set_password_token` and `validate_email_token`.

---

<div class="post-metadata">

### Author: ![banknote](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/banknote/32/980_2.png) [@banknote](https://discuss.tryton.org/u/banknote)
#### Post date: [October 17, 2020, 9:18pm UTC](https://discuss.tryton.org/t/how-to-use-web-user-module/1360/8 "2020-10-17T21:18:58Z")

</div>

I still don’t get how to connect to the REMOTE server?

```auto
# /etc/trytond.conf

[email]
uri = smtps://<name>:<pass>@smtp.a-very-private-mail-server.com:465

```

I tried this configuration, but I feel I need to drill into Tryton source code to understand how to set up SMTP/SSL connection…

In [the doc no such case discussed](https://docs.tryton.org/projects/server/en/latest/topics/configuration.html#email)…  
Would you help me or point me out where these details described?

Constantine.

---

<div class="post-metadata">

### Author: ![iehoshia](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/iehoshia/32/243_2.png) [@iehoshia](https://discuss.tryton.org/u/iehoshia)
#### Post date: [October 17, 2020, 9:32pm UTC](https://discuss.tryton.org/t/how-to-use-web-user-module/1360/9 "2020-10-17T21:32:07Z")

</div>

You should use something like  
`uri = smtp+tls://user:pass@email-smtp.us.com:587`

---

<div class="post-metadata">

### Author: ![TelematicMan](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/t/58956e/32.png) [@TelematicMan](https://discuss.tryton.org/u/TelematicMan)
#### Post date: [October 17, 2020, 10:38pm UTC](https://discuss.tryton.org/t/how-to-use-web-user-module/1360/10 "2020-10-17T22:38:04Z")

</div>

Using MS 365 Exhange Online if anyone is using Exchange online the setting options are in this article.

[Option 1 (recommended): Authenticate your device or application directly with a Microsoft 365 or Office 365 mailbox, and send mail using SMTP AUTH client submission](https://docs.microsoft.com/en-us/exchange/mail-flow-best-practices/how-to-set-up-a-multifunction-device-or-application-to-send-email-using-microsoft-365-or-office-365)

---

<div class="post-metadata">

### Author: ![banknote](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/banknote/32/980_2.png) [@banknote](https://discuss.tryton.org/u/banknote)
#### Post date: [October 18, 2020, 2:02am UTC](https://discuss.tryton.org/t/how-to-use-web-user-module/1360/11 "2020-10-18T02:02:22Z")

</div>

Works like a magic!

```auto
uri = smtp+tls://info:<PASS>@mail.mailserver.com:587

```

TESTED with command:

```auto
trytond-admin --test-email <my_email>@gmail.com --logconf /etc/trytond.log.conf -c /etc/trytond.conf -d tryton | grep -v INFO 

```

I used `grep -v INFO` to skip info of the administration console…

---

<div class="post-metadata">

### Author: ![system](https://discuss-cdn.tryton.org/uploads/default/original/1X/c6f8ec0a40525cdcd50058c734283450a4b3d38b.png) [@system](https://discuss.tryton.org/u/system)
#### Post date: [November 17, 2020, 2:02am UTC](https://discuss.tryton.org/t/how-to-use-web-user-module/1360/12 "2020-11-17T02:02:25Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
