Skip to content

OAuth Issue #119

@hrangel

Description

@hrangel

Hi,

Trying to setup my first project using angular2-token and oauth, I've reached to a strange dead-end.
Whenever I try to login (with google for instance) I get this URL built (at the method _buildOAuthUrl)
${window.location.origin}/${oAuthPath}?omniauth_window_type=${windowType}&auth_origin_url=${encodeURIComponent(callbackUrl)}

When the window.open method fires it shows:
Cannot GET /$%7Bwindow.location.origin%7D/$%7BoAuthPath%7D?omniauth_window_type=${windowType}&auth_origin_url=${encodeURIComponent(callbackUrl)}

It feels like a stupid tweak would solve everything, but I can't seem to find it.
Can you help?

I'm using version angular2-token 0.2.0-beta.6
My API runs at: http://localhost:3000/api/v1
My Angular2 runas at: http://localhost:8000

Here is my setup:

this._tokenService.init({
            apiPath: "http://localhost:3000/api/v1",
            oAuthPaths: {
                facebook: '/auth/facebook',
                google:   '/auth/google'
            }
        });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions