Skip to content

๋‹ค๋ฅธ ํ˜ธ์ŠคํŠธ๋กœ ์ด๋™ํ•ด์•ผํ•  ๋•Œ ์ฒ˜๋ฆฌ์— ๊ด€ํ•˜์—ฌย #629

@nabi-chan

Description

@nabi-chan

(english question follows korean)

์•ˆ๋…•ํ•˜์„ธ์š”, StackFlow ๋„์ž… ๊ณผ์ •์—์„œ ๊ธฐ์ˆ ์ ์ธ ํ™•์ธ์ด ํ•„์š”ํ•˜์—ฌ ์งˆ๋ฌธ๋“œ๋ฆฝ๋‹ˆ๋‹ค!

์„œ๋น„์Šค๋ฅผ ๋งŒ๋“ค๋ฉฐ PG ๊ฒฐ์ œ / SNS ๋กœ๊ทธ์ธ์ฒ˜๋Ÿผ ํŠน์ • ์ƒํ™ฉ์—์„œ ์„œ๋น„์Šค ์™ธ๋ถ€๋กœ ์ด๋™ํ–ˆ๋‹ค๊ฐ€ ๋‹ค์‹œ ํŠน์ • Activity๋กœ ๋Œ์•„์˜ค๋Š” ์ˆ˜์š”๊ฐ€ ์žˆ๋Š”๋ฐ์š”.
์ด ์ˆ˜์š”๋ฅผ ์–ด๋–ค ๋ฐฉ์‹์œผ๋กœ ๊ตฌํ˜„ํ•˜๋Š”๊ฒŒ ๋‹น๊ทผ ํŒ€์—์„œ ์ƒ๊ฐํ•˜๋Š” ๋ชจ๋ฒ”๋‹ต์•ˆ์ผ์ง€๊ฐ€ ๊ถ๊ธˆํ•ฉ๋‹ˆ๋‹ค.

์ง€๊ธˆ ๋‹น์žฅ ์ƒ๊ฐํ–ˆ๋˜ ๋ฐฉํ–ฅ์„ฑ์œผ๋กœ๋Š”, ํŽ˜์ด์ง€ ์ด๋™ / ํŒ์—…๋“ฑ์˜ ์ด๋ฒคํŠธ๋ฅผ ๊ฐ€๋กœ์ฑ„ ์™ธ๋ถ€ ์„œ๋น„์Šค์ผ ๊ฒฝ์šฐ,
์‚ฌ์ „์— ์ค€๋น„ํ•œ iframe๋งŒ ์กด์žฌํ•˜๋Š” Activity๋กœ ์ด๋™์„ ์‹œ์ผœ ํ”„๋กœ์„ธ์Šค๋ฅผ ์ง„ํ–‰ํ•˜๊ฒŒ ํ•˜๋Š”๊ฒƒ์ด ์ œ์ผ ๋จผ์ € ์ƒ๊ฐ๋‚˜๋Š”๋ฐ์š”.

์ด๋Ÿด ๊ฒฝ์šฐ์—๋Š” iframe์—์„œ ํ”„๋กœ์„ธ์Šค๊ฐ€ ์™„๋ฃŒ๋˜์—ˆ์„๋•Œ postMessage ๋“ฑ์„ ์‚ฌ์šฉํ•ด์„œ callback ์ฒ˜๋ฆฌ๋ฅผ ๋ณ„๋„๋กœ ํ•ด์•ผํ•˜๋Š” ๋ถˆํŽธํ•จ์ด ์ƒ๊ธฐ์ง€๋งŒ,
์ง€๊ธˆ์˜ ์ƒํ™ฉ์—์„œ๋Š” ๊ฐ€์žฅ ์ตœ์ ํ•ด๋ผ๊ณ  ํŒ๋‹จํ• ์ˆ˜๋„ ์žˆ๋Š”๋ฐ์š”.

-> SOP ๋ฌธ์ œ๋ฅผ ์žŠ๊ณ  ์žˆ์—ˆ๋„ค์š” ๐Ÿซ 

ํ˜น์‹œ๋ผ๋„ ์‹ค์ œ๋กœ ์‚ฌ์šฉํ•˜๊ณ  ๊ณ„์‹  ๋ ˆํผ๋Ÿฐ์Šค / ๋” ์ข‹์€ ๊ตฌํ˜„ ๋ฐฉ์•ˆ์ด ์žˆ๋‹ค๋ฉด ๊ฐ™์ด ๋…ผ์˜ํ•ด๋ณด๋ฉด ํ–‰๋ณตํ•  ๋“ฏ ํ•ฉ๋‹ˆ๋‹ค!
๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค :)

--

Hello, I have a question regarding the technical aspects of StackFlow implementation.

While developing a service, there's a need to navigate outside the service and then return to a specific activity in certain situations, such as PG payments or SNS logins.
I'm curious about the Carrot team's best approach for implementing this requirement.

The direction I'm currently considering is intercepting events like page transitions and pop-ups, and if it's an external service,
the first thing that comes to mind is to navigate to an activity that only contains a pre-prepared iframe and proceed with the process.

This approach requires a separate callback using postMessage or something similar when the process is completed in the iframe, which is inconvenient.
But for the current situation, this may be the most optimal solution.

-> I forgot about the SOP issue. ๐Ÿซ 

If you have any references or better implementations you're using, I'd be happy to discuss them!
Thank you :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions