stevetracvc commented on issue #16082:
URL: https://github.com/apache/superset/issues/16082#issuecomment-895371137
We only use one provider, so we completely bypass that page. It's actually a
flask thing, not superset. This is the location in the (old, maybe v0.37)
docker container.
#
/usr/local/lib/python3.6/site-packages/flask_appbuilder/templates/appbuilder/general/security/login_oauth.html
```
!-- extend base layout -->
{% extends "appbuilder/base.html" %}
{% block content %}
<script type="text/javascript">
var baseLoginUrl = "{{appbuilder.get_url_for_login}}";
var baseRegisterUrl = "{{appbuilder.get_url_for_login}}";
var next = "?next={{request.args.get('next', '')}}"
var currentSelection = "";
function set_openid(pr) {
$('.provider-select').removeClass('fa-black');
$('#' + pr).addClass('fa-black');
currentSelection = pr;
}
function signin() {
if (currentSelection != "") {
window.location.href = baseLoginUrl + currentSelection + next;
}
}
function register() {
if (currentSelection != "") {
window.location.href = baseRegisterUrl + currentSelection +
'/register' + next;
}
}
set_openid("{{ providers[0].name }}");
signin();
</script>
{% endblock %}
```
Our edits are just the last two lines of JS:
```
set_openid("{{ providers[0].name }}");
signin();
```
which automatically selects the first provider and runs the signin function.
If you don't want to auto sign in, just use the set_openid line.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]