Git Product home page Git Product logo

connect-example-angularjs's People

Contributors

adalinesimonian avatar christiansmith avatar henrjk avatar ikb42 avatar oren avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

oren henrjk ikb42

connect-example-angularjs's Issues

Does not readily work with boot2docker on OS X

I started trying this out on OS X with docker and boot2docker

mac:connect-example-angularjs dev$ docker -v
Docker version 1.6.0, build 4749651
mac:connect-example-angularjs dev$ boot2docker -v
Boot2Docker-cli version: v1.6.0
Git commit: 9894ae9

In my scenario I first setup [Anvil Connect authorization server (https://github.com/anvilresearch/connect/blob/master/README.md). As a result the Anvil Authorization server runs on localhost:3000.

The first stumbling block was that inplace sed editing is not easily portable between linux and OSX versions of sed. After a workaround this worked for me. One thing that was not so good was that the in place changes made it harder to see what other changes were made in the same file.

Then I followed the setup in this readme, but things would not work. After @oren and @christiansmith helped me out on gitter, I was able to get this going remembering that with boot2docker one had to connect to boot2docker ip. So instead of connecting to localhost:9000 one had to connect to 192.168.59.103:9000.

However the browser showed an html file which looked bare of style. The problem was that the bower_components were not served, so all scripts were missing.

After correcting this things seemed to work better and if I recollect correctly I fixed a few things regarding mismatches of the anvil connect server client registration with the requests that were made by the app.

It took me a while to notice that how the authentication redirect worked. The key was that the callback redirect actually served angular index.html under the name callback as this was not defined. I am not sure whether I had introduced this with my tweaks or whether this was intentional. As a result angular would reload completely.

This is different when using a display popup request with the proper callback.
I have documented with some screenshot the interaction I am now seeing with the popup callback in my fork (intended to become a PR).

For better debugging I disabled the session stuff in my fork also.

Should the changes I made be incorporated into this repository?

PS I am planning to add a short section in the README.md to clarify usage without docker and grunt serve.

Significantly improve ease of use

This repository has bloated in scope and since become difficult to get up and running for a healthy number of users, that have, as a result, spent a considerable amount of time with @christiansmith and myself in hangouts trying to get them up and running, not before it started to take so long as I had to provide the users a copy of an express app I keep locally which is configured to work with Anvil Connect.

I propose we identify the exact factors that are making this repo a deployment pain and work out a plan of action. This repository was, and is, meant to be a quick-and-easy demo app that any user, anywhere, can get up and running in a flash.

Registration script problem

Running register_with_anvil_connect.sh in my connect directory gives me this:

Registring nv add client {
  "client_name": "Angular example with popup for http://localhost:9000",
  "default_max_age": 36000,
  "redirect_uris": [
    "http://localhost:9000/callback_popup.html",
    "http://localhost:9000/rp.html"],
  "post_logout_redirect_uris": ["http://localhost:9000"],
  "trusted": "true"
}
Succeeded.
Define CLIENT_ID as follows in authconf.json:
{
...
  "CLIENT_ID" : "",
...
}

unsupported_response_type

Using the example with popup, clicking signin gives this in the console for callback_popup.html:

pageUrl=http://localhost:9000/callback_popup.html#error=unsupported_response_type&error_description=Unsupported%20response%20type

The response_type is not specified in the demo app, the default from anvil-connect appears to be 'id_token token'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.