question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to set the 'goBackURL' parameter in a Angular 7 app?

See original GitHub issue

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [x] Help needed

OS and Version?

Windows 10.

Versions

 _                      _                 ____ _     ___
/ \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|

/ △ \ | '_ \ / | | | | |/ _ | '__| | | | | | | / ___ | | | | (| | || | | (| | | | || | | | // __| ||_, |_,||_,|| _||| |___/

Angular CLI: 7.1.3 Node: 8.11.1 OS: win32 ia32 Angular: 7.1.3 … animations, cli, common, compiler, compiler-cli, core, forms … http, language-service, platform-browser … platform-browser-dynamic, platform-server, router

Package Version

@angular-devkit/architect 0.11.3 @angular-devkit/build-angular 0.11.3 @angular-devkit/build-optimizer 0.11.3 @angular-devkit/build-webpack 0.11.3 @angular-devkit/core 7.1.3 @angular-devkit/schematics 7.1.3 @angular/cdk 7.1.1 @angular/fire 5.1.1 @angular/flex-layout 7.0.0-beta.19 @angular/material 7.1.1 @ngtools/webpack 7.1.3 @schematics/angular 7.1.3 @schematics/update 0.11.3 rxjs 6.3.3 typescript 3.1.6 webpack 4.23.1

Repro steps

<ngx-auth-firebaseui *ngIf="thisUser==null"
                     [guestEnabled]="false"
                     [goBackURL]="counter"
                     (onSuccess)="printUser($event)"
                     (onError)="printError($event)">
</ngx-auth-firebaseui>
<ngx-auth-firebaseui-user *ngIf="thisUser"></ngx-auth-firebaseui-user>

Desired functionality

I would like to see that after a login the user gets redirected to a certain page or route.

Mention any other details that might be useful

It doesn’t seem that goBackURL has any affect at all on redirecting. Also, when signing out from inside the ngx-auth-firebaseui-user component the console shows the following error:

GET https://localhost:44367/null 404 null:1

So I assume that somehow we need to specify a redirect URL for after signing out. I couldn’t find in the documentation anything related to this on how and where to define such.

Also, I was wondering if I can have provider login inside one of my windows / Component and not in an external window?

Last, where can I change the toast message greeting from ‘hallo’ to ‘hello’?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
Avrohomcommented, Dec 21, 2018

Thanks ever so much @AnthonyNahas for the update.

Happy to be of some kind of a help.

2reactions
Avrohomcommented, Dec 15, 2018

Hi @beeman

Thanks for your input. image

I think that the documentation on goBackURL is misleading. From inspecting the code it seems to me that this option is the redirect property for AFTER Clicking the verify link inside the verify email. It has nothing to do with successful or unsuccessful authentication redirection, and most definitely after sign out.

The console error after sign out - seems to me - to have nothing to do with ngx-auth-firebaseui. It is the way it is implemented by Firebase themselves. See the following link. https://firebase.google.com/docs/reference/js/firebase.auth.Auth#signOut

ngx-auth-firebaseui calls this method basically.

I have tested it myself by adding a <nav> menu item and calling signOut() directly on the AngularFireAuth.auth object which is authProcessService.afa.auth and I get the same results.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular 7/8 - How to get url parameters in app component
I have tried queryParams, params, url, queryParamsMap but none of these seems to be working. all I get is empty value. inside app...
Read more >
Common Routing Tasks - Angular
The application name in the following example is routing-app . ... Set the value of the attribute to the component to show when...
Read more >
Adding navigation - Angular
Click links on the page to navigate within your single-page application; Click the browser's back and forward buttons to navigate the browser history ......
Read more >
Building and serving Angular apps
This page discusses build-specific configuration options for Angular projects. Configuring application environmentslink. You can define different named ...
Read more >
ng new - Angular
Option Description Value Type Default Value ‑‑commit Initial git repository commit information. boolean true ‑‑directory The directory name to create the workspace in. string ‑‑force Force...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found