Comments (9)
First, I've found that the issue was simply not having the Google+ API enable. I feel like for the development
env, there needs to be much better debug messaging enabled. This was a simple issue to fix, but there was nothing indicating what needed to happen.
Second, I'm now receiving another message in the client. It is happening on the redirect back from Google to the app. The message reads:
{
"jwt":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MywiaWF0IjoxNTIzNjQwNjYyLCJleHAiOjE1MjYyMzI2NjJ9.Lp0bELpbJaYqSC6YSj1PNIyXHzYWVhvF4GrDxAiItJY",
"user":{
"id":3,
"username":"[email protected]",
"email":"[email protected]",
"provider":"google",
"role":{
"id":3,
"name":"Public",
"description":"Default role given to unauthenticated user.",
"type":"public"
},
"updated_at":null,
"created_at":null
}
}
I'm not sure why at this point the client isn't returning to the app (I'd expect it to be going to http://localhost:3000/
) in a logged-in state. Instead the url is pointing to: http://localhost:1337/auth/google/callback?access_token=...
from strapi-examples.
I think that you'll find answer in this documentation.
Let me know if you're still struggling
from strapi-examples.
If I follow the steps in those docs, I'm continually redirected back to Google account selection page (ie https://accounts.google.com/signin/oauth/oauthchooseaccount...
)
I'm confused as to why in the docs for the "The redirect URL to your front-end app" section it says to use connect/google
, while the default value in the admin is auth/google/callback
.
Neither of the values seem to work
Also, I'm pretty sure the base url used for "The redirect URL to your front-end app" is wrong. In the docs it is http://locahost:3000/...
(strapi.remoteURL
) while in the admin it's configured to http://localhost:1337/...
(strapi.backendURL
). Which one is correct?
from strapi-examples.
If you're using the boilerplate provided in the examples it's http://locahost:3000/connect/google
.
You're right, the url writtent in the admin is wrong but if you click on the field you'll see that it will automatically change to auth/google/callback
so you need to edit this field in the admin.
from strapi-examples.
I am using the boilerplate provider, which uses http://locahost:3000/
and that seems all good.
What I am saying, is that the Strapi admin code running at http://locahost:1337/
is in fact using this exact same base url for the "The redirect URL to your front-end app" section. I can click to change the auth/google/callback
portion, but that is not the problem. The problem is base url for this section is in fact http://locahost:1337/
and not http://locahost:3000/
as you mentioned it should be (and this cannot be changed):
This is a screenshot from my local development admin server:
Beyond this issue, I don't understand why there is a feature in the admin to prevent a admin from changing the base url (unless it's not a feature...)? It is very likely other developers will not be developing at http://locahost:3000/
and would want to change this.
from strapi-examples.
Well the redirect URL of your front-end app can be changed, However the one that manages the authentication between your api and your provider cannot be modified since it's dynamic, so if you change the port of your API the field will also be updated
from strapi-examples.
Hmm alright. So how is it in this documentation you were able to set both http://locahost:3000
and http://localhost:1337
?
This is what I'm most confused about.
from strapi-examples.
@JeffWeim facing the same issues here while trying to integrating it with my strapi admin. Any clues as to what values you put as redirect URL in your provider?
from strapi-examples.
you need to make google process firstly from frontend app after that response add to the strapi backend server
from strapi-examples.
Related Issues (20)
- Issues installing and running 'login-react' HOT 1
- The hello world example is not available HOT 1
- Azure CosmosDB connection issue
- Installing dependencies for login-react causes problems HOT 1
- Providers: Incomplete field "The redirect URL to add in your Google application configurations" HOT 2
- Auth providers in production
- Google Oauth for admin users
- nuxt-strapi-deliveroo-clone-tutorial BUGS
- frontend shouldn't decide of the order price HOT 1
- Error: Request failed with status code 404 HOT 7
- Chessecakes example could need updating
- Twitter login seems to be broken
- .
- Google auth not working HOT 6
- Login react works with electron js?
- gatsby-source-strapi 403 error from starter HOT 1
- Next.JS-snipcart-strapi-printful
- broken link in documentation
- Readme Setup - git clone permission error HOT 1
- Need an example for Microsoft authentication
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from strapi-examples.