New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
auth wip dont merge #59
Conversation
|
|
||
| app.use(passport.initialize()); | ||
|
|
||
| app.use(cors()); | ||
| app.use('*', cors()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My API uses koa, so I use koa-cors, might be something like this:
app.use('*', cors({
origin: '*',
allowedHeaders: ['Authorization', 'Content-Type'],
methods: ['PUT', 'POST', 'PATCH', 'DELETE', 'GET', 'HEAD']
}));There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still yields
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://localhost:8080/sessions. This can be fixed by moving the resource to the same domain or enabling CORS.
for me :/
|
@steveklabnik let's create a endpoint just to issue a brand new JWT token to the frontend. |
|
@steveklabnik I will fork the api project and try to help you ! |
|
ahh thanks! <3 Let me push this commit up with what you told me about |
|
great. let me know if work or not ! I don't know what the ember is expecting as response. |
|
it's not entirely clear to me either to be honest :/ I'm just trying to do the absolute simplest possible thing to make auth work between the two i'm gonna go get some coffee, but maybe ping me on irc too? and no worries if you just give up here |
|
I will setup my machine and ping you when I figure it out. |
|
@steveklabnik |
|
@steveklabnik |
|
ahhh awesome thank you! I will try to see if i can get ember to play nice now. that makes perfect sense |
|
|
|
Just pushed to my fork. |
|
@steveklabnik jwtStrategy will validate the issuer and audience. On my fork, I just removed ( issuer and audience) to make it simpler. make sense ? |
goes with artisan-tattoo/assistant-frontend#17