mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-21 16:26:43 +00:00
Redirect to onboarding from auth page (#1640)
* Redirect to onboarding from auth page * Remove left over trial code
This commit is contained in:
parent
59010baf89
commit
300425e698
@ -92,6 +92,14 @@ class HaAuthorize extends LocalizeLiteMixin(PolymerElement) {
|
|||||||
// Fetch auth providers
|
// Fetch auth providers
|
||||||
try {
|
try {
|
||||||
const response = await window.providersPromise;
|
const response = await window.providersPromise;
|
||||||
|
const result = await response.json();
|
||||||
|
|
||||||
|
// Forward to main screen which will redirect to right onboarding page.
|
||||||
|
if (response.status === 400 && result.code === 'onboarding_required') {
|
||||||
|
location.href = '/';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const authProviders = await response.json();
|
const authProviders = await response.json();
|
||||||
|
|
||||||
if (authProviders.length === 0) {
|
if (authProviders.length === 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user