Angular 5 OAuth Implicit Flow Implemenation

43 views
Skip to first unread message

Jake Garris

unread,
Feb 26, 2018, 10:42:44 AM2/26/18
to Meetup API
First of all... Sorry if this posts twice. I tried to make this once, but it doesn't appear to be showing in the topic list. 

I am working on integrating the Meetup API into an Angular 5 project I am working on. So far I have been able to successfully authenticate with Meetup, but all of my subsequent requests fail with a supposed CORS issue.

I have poured over the documention on how to authenticate with the OAuth 2.0 Implicit Flow and how to make requests with the Bearer token. 

I have registered my local dev site (http://localhost:4200) as my Consumer's Redirect URI. This is working and I am able to get back the Access Token from the redirect back to my site .

Once that redirect happens, a component parses the Access Token from the URL fragment then sends it to a service for storage. That same service then attempts to call the Meetup API, but every endpoint I have tried has failed. Here is what I'm trying

let headers: HttpHeaders = new HttpHeaders();
headers = headers.set('Authorization', `Bearer ${this.accessToken}`);
return this.http.get( url, { headers: headers } );

My understanding is that as long as my Redirect URI is localhost:4200, I should be able to make requests from any route in my site. Meetup's CORS implementation should allow any call originating from localhost:4200/*.
However, every call I make I get the error below. It claims to be a CORS issue, but either I'm missing something, or there is a hidden problem somewhere. 

If anyone has some insight into what I'm missing, and could help solve, I would appreciate it. 

Thanks!


Roger Price

unread,
Mar 19, 2018, 1:02:27 AM3/19/18
to Meetup API
Hi - I know nothing about CORS but I do know others have had issues with Meetup API and CORS...  https://github.com/meetup/api/issues/261
Maybe this is helpful...
Reply all
Reply to author
Forward
0 new messages