Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cant login after vx3r/wg-gen-web:f90124af build #40

Closed
nestyurkin opened this issue May 16, 2020 · 12 comments
Closed

cant login after vx3r/wg-gen-web:f90124af build #40

nestyurkin opened this issue May 16, 2020 · 12 comments

Comments

@nestyurkin
Copy link

in browser console:

Error: "ApiService: TypeError: e is undefined"
    get api.service.js:14
App.vue:69
server report oauth2 is disabled, fake exchange auth.js:50:18
Updating authStatus from  to disabled App.vue:91
Updating authStatus from disabled to success App.vue:91
@vx3r
Copy link
Owner

vx3r commented May 17, 2020

hi, can you please update to latest version 6e08b28 and share your config if the problem persists

@nestyurkin
Copy link
Author

nestyurkin commented May 17, 2020

it all about wg-gen-web behind traefik ...
if I disable authorization on the traefik side - everything works
I tried to delete authorization headers - it does not help
last working docker build - f90124a
I have configured automatic updating of images via watchtower, so it hurts to return to the UI and it does not work

my ansible config:

  - name: vx3r/wg-gen-web:latest
     tags:
       - docker
       - wireguard
       - wg-ui
     docker_container:           
       name: wg-gen-web
       image: vx3r/wg-gen-web:latest
       pull: yes        
       restart_policy: always
       recreate: yes
       volumes:
         - "{{docker_dir}}/wireguard:/data"
       labels:
         traefik.enable: 'true'
         traefik.http.routers.wireguard.tls: 'true'
         traefik.http.routers.wireguard.rule: "Host(`vpn.#########.ru`)"
         traefik.http.routers.wireguard.entrypoints: 'websecure'
         traefik.http.services.wireguard.loadbalancer.server.port: '8080'
         traefik.http.routers.wireguard.middlewares: 'auth-wg'
         traefik.http.middlewares.auth-wg.basicauth.users: '#########:##################'
         traefik.http.middlewares.auth-wg.basicauth.removeheader: 'true'
       env:
         TZ: Europe/Moscow
         WG_INTERFACE_NAME: wg0.conf
         WG_CONF_DIR: /data
         SMTP_HOST: smtp.yandex.ru
         SMTP_PORT: "465"
         SMTP_USERNAME: #########
         SMTP_PASSWORD: #########
         SMTP_FROM: #########
         GIN_MODE: release 

   - name: watchtower container
     tags:
       - docker
       - watchtower
     docker_container:           
       name: watchtower
       image: containrrr/watchtower
       restart_policy: always
       volumes: 
         - /var/run/docker.sock:/var/run/docker.sock
         - "{{docker_dir}}/watchtower/config.json:/config.json"
       command: --interval 300 --cleanup
       env:
         TZ: Europe/Moscow

@vx3r
Copy link
Owner

vx3r commented May 17, 2020

ok make sens, basic auth does't work since i implemented oauth2 oidc. Can you switch to this auth method as described in readme ?

@nestyurkin
Copy link
Author

I switched to OAUTH2_PROVIDER_NAME: github
now i can login, and everyone who has a login to the github can also?
how can I manage users who can enter the UI ?

can logout and email field is empty
изображение

@vx3r
Copy link
Owner

vx3r commented May 17, 2020

you have to take an oauth provider you control, like self hosted gitlab, nextcloud or Dex. i dont know if there is a way to limit github users. For email its weird, you have a public email in your account ?

@nestyurkin
Copy link
Author

set public email - now its ok

@nestyurkin
Copy link
Author

is there a chance to fix OAUTH2_PROVIDER_NAME=fake
to completely ignore authorization?

I'm switching to the old image for now :(

@vx3r
Copy link
Owner

vx3r commented May 17, 2020

ok will try to make it work with auth basic

@sphen13
Copy link
Contributor

sphen13 commented May 17, 2020 via email

@vx3r
Copy link
Owner

vx3r commented May 18, 2020

just pushed some changes, it must work now. Can you please confirm ? @sphen13 @nestyurkin

@nestyurkin
Copy link
Author

confirm - now its works! thanks!

@vx3r vx3r closed this as completed May 18, 2020
@sphen13
Copy link
Contributor

sphen13 commented May 18, 2020

Thank you!! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants