Custom Oauth2 (GitLab) Login based on Google


My company uses Gitlab oauth2, and we thought about using it for Redash login as well, instead of creating users manually. I thought about modifying the authentication/ module in order for it to work with Gitlab. The problem is that the file will get rewritten on every container reload.
I thought about an file on the host machine called that will be loaded and override the original file… Would that work? Or is there any other possibility?
Do you have an idea how I could achieve this ?