8000 google authentication callback url bug · Issue #535 · meanjs/mean · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Aug 30, 2021. It is now read-only.
This repository was archived by the owner on Aug 30, 2021. It is now read-only.
google authentication callback url bug #535
@junit38

Description

@junit38

Hi,
I get URL like localhost:3000/# when I use google authentication with passport.

I fixed the problem using the same way which has been used to fix the Facebook bug with redirect (public/modules/application.js):

//Then define the init function for starting up the application
angular.element(document).ready(function() {
    // Fixing facebook bug with redirect
    if (window.location.hash === '#_=_') window.location.hash = '#!';

    // Then init the app
    angular.bootstrap(document, [ApplicationConfiguration.applicationModuleName]);
});

I added this part:

// Fixing google bug with redirect
    if (window.location.href[window.location.href.length - 1] === '#' &&
        // for just the error url (origin + /#)
        (window.location.href.length - window.location.origin.length) === 2) {
        window.location.href = window.location.origin + '/#!';
    }

Does you know something about it?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0