Coder Social home page Coder Social logo

Wordpress connection about firebase HOT 10 OPEN

ugurdar avatar ugurdar commented on July 20, 2024
Wordpress connection

from firebase.

Comments (10)

JohnCoene avatar JohnCoene commented on July 20, 2024

If the website and the app share the same Firebase project they will only have to login once, in either place. That's one of the features of firebase.

from firebase.

ugurdar avatar ugurdar commented on July 20, 2024

website and app sharing same Firebase project and I created config file following this way:

firebase::firebase_config(
    api_key = "my-api-key", 
    project_id = "my-project-id"
)

from firebase.

JohnCoene avatar JohnCoene commented on July 20, 2024

But what is the problem exactly?

from firebase.

ugurdar avatar ugurdar commented on July 20, 2024

In my wordpress website, when user logged in, can see the "Application" button. When clicked on the button, user see another page and there is Shiny app but should login one more time.
My problem is when user login in wordpress and click on Application button and come to Shiny app page i want to be able to access app directly instead of logging in again.

Do i need to handle this problem on wordpress side? Or can I generate a token when the user clicks this button and capture it using the Shiny firebase package?

Sorry if I'm asking a weird question, I'm very new to this wordpress and firebase stuff :/

from firebase.

JohnCoene avatar JohnCoene commented on July 20, 2024

Firebase (and most auth services) will keep you signed in only on the same domain.
So if users sign in on on wordpress at mysite.com then go the app at app.mysite.com it will keep them sign in but if they go to anothersite.com it will not.

from firebase.

ugurdar avatar ugurdar commented on July 20, 2024

mysite.com -> app.mysite.com I'm following this but I hosted my app on app.fly.io with a docker container and directed to app.mysite.com I guess problem is here.

I thought this solution, when user click on the button it will create a token and save it in a database and redirect user with a app.myiste.com/?user_email=user@email&token=$token then Shiny app firstly control the database if user and token matched won't show firebase ui.

from firebase.

JohnCoene avatar JohnCoene commented on July 20, 2024

That's strange it should work, not sure how the app is hosted is it on your actual domain or does it redirect?

from firebase.

ugurdar avatar ugurdar commented on July 20, 2024

I'm using fly.io server, I dockerized my app and hosted as myapp.fly.io and redirect to myapp.mysite.com

from firebase.

JohnCoene avatar JohnCoene commented on July 20, 2024

Make sure you have authorised the domain on firebase console maybe

from firebase.

ugurdar avatar ugurdar commented on July 20, 2024

I authorised, I can login when I type my mail and password at myapp.mysite.com.

I don't how how actually it's work but is it possible to getting a login token from Firebase? and is the package allows getting that tokens before app start?

WP Sending Firebase Token to myapp.mysite.com with a query -> app observering token if token exist allows user.

from firebase.

Related Issues (20)

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.